You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
- Implements asynchronous transfer queues from PR #87590. - Adds ubershaders that can run with specialization constants specified as push constants. - Pipelines with specialization constants can compile in the background. - Added monitoring for pipeline compilations. - Materials and shaders can now be created asynchronously on background threads. - Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
This commit is contained in:
@@ -92,6 +92,11 @@ void Performance::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_EDGE_CONNECTION_COUNT);
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_EDGE_FREE_COUNT);
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_OBSTACLE_COUNT);
|
||||
BIND_ENUM_CONSTANT(PIPELINE_COMPILATIONS_CANVAS);
|
||||
BIND_ENUM_CONSTANT(PIPELINE_COMPILATIONS_MESH);
|
||||
BIND_ENUM_CONSTANT(PIPELINE_COMPILATIONS_SURFACE);
|
||||
BIND_ENUM_CONSTANT(PIPELINE_COMPILATIONS_DRAW);
|
||||
BIND_ENUM_CONSTANT(PIPELINE_COMPILATIONS_SPECIALIZATION);
|
||||
BIND_ENUM_CONSTANT(MONITOR_MAX);
|
||||
}
|
||||
|
||||
@@ -143,7 +148,11 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
|
||||
PNAME("navigation/edges_connected"),
|
||||
PNAME("navigation/edges_free"),
|
||||
PNAME("navigation/obstacles"),
|
||||
|
||||
PNAME("pipeline/compilations_canvas"),
|
||||
PNAME("pipeline/compilations_mesh"),
|
||||
PNAME("pipeline/compilations_surface"),
|
||||
PNAME("pipeline/compilations_draw"),
|
||||
PNAME("pipeline/compilations_specialization"),
|
||||
};
|
||||
|
||||
return names[p_monitor];
|
||||
@@ -185,6 +194,16 @@ double Performance::get_monitor(Monitor p_monitor) const {
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_TEXTURE_MEM_USED);
|
||||
case RENDER_BUFFER_MEM_USED:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_BUFFER_MEM_USED);
|
||||
case PIPELINE_COMPILATIONS_CANVAS:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS);
|
||||
case PIPELINE_COMPILATIONS_MESH:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_MESH);
|
||||
case PIPELINE_COMPILATIONS_SURFACE:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE);
|
||||
case PIPELINE_COMPILATIONS_DRAW:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW);
|
||||
case PIPELINE_COMPILATIONS_SPECIALIZATION:
|
||||
return RS::get_singleton()->get_rendering_info(RS::RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION);
|
||||
case PHYSICS_2D_ACTIVE_OBJECTS:
|
||||
return PhysicsServer2D::get_singleton()->get_process_info(PhysicsServer2D::INFO_ACTIVE_OBJECTS);
|
||||
case PHYSICS_2D_COLLISION_PAIRS:
|
||||
|
||||
@@ -101,6 +101,11 @@ public:
|
||||
NAVIGATION_EDGE_CONNECTION_COUNT,
|
||||
NAVIGATION_EDGE_FREE_COUNT,
|
||||
NAVIGATION_OBSTACLE_COUNT,
|
||||
PIPELINE_COMPILATIONS_CANVAS,
|
||||
PIPELINE_COMPILATIONS_MESH,
|
||||
PIPELINE_COMPILATIONS_SURFACE,
|
||||
PIPELINE_COMPILATIONS_DRAW,
|
||||
PIPELINE_COMPILATIONS_SPECIALIZATION,
|
||||
MONITOR_MAX
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user