godot/scene/resources
Tom Coxon a2f3decb88
Prevent shaders from generating code before the constructor finishes.
Fixes #43733: "creating SpatialMaterial in a separate thread creates invalid
shaders (temporarily)."

The bug occurred because various setters called in materials' constructors add
materials to queues that are processed on the main thread. This means that
when the materials are created in another thread, they can be processed on the
main thread before the constructor has finished.

The fix adds a flag to affected materials that prevents them from being added
to the queue until their constructors have finished initialising all the
members.

(cherry picked from commit 9e9bac1549)
2021-09-21 13:53:31 +02:00
..
default_theme Cleanup: Remove executable bit from files which don't need it 2021-01-26 17:00:15 +01:00
animation.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
animation.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
audio_stream_sample.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
audio_stream_sample.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
bit_map.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
bit_map.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
box_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
box_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
capsule_shape_2d.cpp Added option in project settings to draw Shape2D outlines 2021-02-25 07:48:33 -07:00
capsule_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
capsule_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
capsule_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
circle_shape_2d.cpp Added option in project settings to draw Shape2D outlines 2021-02-25 07:48:33 -07:00
circle_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
concave_polygon_shape_2d.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
concave_polygon_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
concave_polygon_shape.cpp Fix crash on debug shapes update if CollisionObject is not in tree 2021-05-22 19:12:39 +02:00
concave_polygon_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
convex_polygon_shape_2d.cpp Fix errors and crash with empty ConvexPolygonShape2D 2021-03-05 22:45:29 +01:00
convex_polygon_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
convex_polygon_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
convex_polygon_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
curve.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
curve.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
cylinder_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
cylinder_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
dynamic_font.cpp Fix crash when using get_available_chars with invalid DynamicFontData 2021-05-22 19:09:11 +02:00
dynamic_font.h Modernize Mutex 2021-02-18 11:58:08 +01:00
environment.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
environment.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
font.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
font.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
gradient.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
gradient.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
height_map_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
height_map_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
line_shape_2d.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
line_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
material.cpp Prevent shaders from generating code before the constructor finishes. 2021-09-21 13:53:31 +02:00
material.h Prevent shaders from generating code before the constructor finishes. 2021-09-21 13:53:31 +02:00
mesh_data_tool.cpp MeshDataTool::create_from_surface Fail on invalid index data 2021-02-25 15:14:32 +01:00
mesh_data_tool.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
mesh_library.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
mesh_library.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
mesh.cpp CPU lightmapper formatting and minor fixes. 2021-01-14 18:08:33 +01:00
mesh.h Implement new CPU lightmapper 2021-01-14 18:05:56 +01:00
multimesh.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
multimesh.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
packed_scene.cpp Fix export var override in PackedScene at runtime 2021-06-29 13:51:45 +02:00
packed_scene.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
particles_material.cpp Prevent shaders from generating code before the constructor finishes. 2021-09-21 13:53:31 +02:00
particles_material.h Prevent shaders from generating code before the constructor finishes. 2021-09-21 13:53:31 +02:00
physics_material.cpp Allow values > 1 for friction and bounce in PhysicsMaterial 2021-05-04 12:45:45 +02:00
physics_material.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
plane_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
plane_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
polygon_path_finder.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
polygon_path_finder.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
primitive_meshes.cpp Tweak CylinderMesh rings property hint to allow a value of 0 2021-06-29 13:52:05 +02:00
primitive_meshes.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
ray_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
ray_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
rectangle_shape_2d.cpp Added option in project settings to draw Shape2D outlines 2021-02-25 07:48:33 -07:00
rectangle_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
resource_format_text.cpp VariantParser: Fix uninitialized ResourceParser funcs 2021-08-03 09:25:48 +02:00
resource_format_text.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
SCsub SCons: Add explicit dependencies on thirdparty code in cloned env 2021-05-04 12:54:34 +02:00
segment_shape_2d.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
segment_shape_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
shader.cpp [3.x] Allow reading shaders from .gdshader files 2021-07-20 12:00:16 +02:00
shader.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
shape_2d.cpp Added option in project settings to draw Shape2D outlines 2021-02-25 07:48:33 -07:00
shape_2d.h Added option in project settings to draw Shape2D outlines 2021-02-25 07:48:33 -07:00
shape.cpp Expose get_debug_mesh in Shape to scripting API 2021-05-05 18:35:54 +02:00
shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
skin.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
skin.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
sky.cpp Remove high radiance sizes from the editor due to issues on specific GPUs 2021-05-22 19:08:35 +02:00
sky.h CPU lightmapper environment energy fixes. 2021-04-22 18:07:16 +02:00
sphere_shape.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
sphere_shape.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
style_box.cpp Fix StyleBoxLine's incorrect style margin values 2021-02-16 14:27:40 +01:00
style_box.h Fix typo in theming methods ("botton" -> "bottom") 2021-01-26 17:00:15 +01:00
surface_tool.cpp Check input mesh is valid in SurfaceTool methods 2021-05-09 16:11:09 +02:00
surface_tool.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
text_file.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
text_file.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
texture.cpp Update external texture flag configuration. 2021-08-13 10:41:19 +02:00
texture.h Modernize RWLock 2021-02-18 11:41:07 +01:00
theme.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
theme.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
tile_set.cpp Fix selection of spaced atlas tile when using priority 2021-07-26 15:39:14 +02:00
tile_set.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
video_stream.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
visual_shader_nodes.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
visual_shader_nodes.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
visual_shader.cpp [3.2] Prevents default values of VSNodeCustom from overriding by a script 2021-04-26 11:50:44 +02:00
visual_shader.h [3.2] Prevents default values of VSNodeCustom from overriding by a script 2021-04-26 11:50:44 +02:00
world_2d.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
world_2d.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
world.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
world.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00