doctool: Fix differences between headless and Vulkan rendering backends
Fixes #53913.
This commit is contained in:
parent
8748247d6f
commit
da98357e6e
|
@ -8913,6 +8913,8 @@ void RenderingDeviceVulkan::initialize(VulkanContext *p_context, bool p_local_de
|
|||
}
|
||||
}
|
||||
|
||||
// Note: If adding new project settings here, also duplicate their definition in
|
||||
// rendering_server.cpp for headless doctool.
|
||||
staging_buffer_block_size = GLOBAL_DEF("rendering/vulkan/staging_buffer/block_size_kb", 256);
|
||||
staging_buffer_block_size = MAX(4, staging_buffer_block_size);
|
||||
staging_buffer_block_size *= 1024; //kb -> bytes
|
||||
|
|
|
@ -1343,8 +1343,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
display_driver_idx = 0;
|
||||
}
|
||||
|
||||
if (audio_driver == "") { // specified in project.godot
|
||||
audio_driver = GLOBAL_DEF_RST_NOVAL("audio/driver/driver", AudioDriverManager::get_driver(0)->get_name());
|
||||
GLOBAL_DEF_RST_NOVAL("audio/driver/driver", AudioDriverManager::get_driver(0)->get_name());
|
||||
if (audio_driver == "") { // Specified in project.godot.
|
||||
audio_driver = GLOBAL_GET("audio/driver/driver");
|
||||
}
|
||||
|
||||
for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
|
||||
|
|
|
@ -532,6 +532,7 @@ void GPUParticles2D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_trail_section_subdivisions"), &GPUParticles2D::get_trail_section_subdivisions);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
|
||||
ADD_PROPERTY_DEFAULT("emitting", true); // Workaround for doctool in headless mode, as dummy rasterizer always returns false.
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount");
|
||||
ADD_GROUP("Time", "");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "lifetime", PROPERTY_HINT_RANGE, "0.01,600.0,0.01,or_greater"), "set_lifetime", "get_lifetime");
|
||||
|
|
|
@ -562,6 +562,7 @@ void GPUParticles3D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_transform_align"), &GPUParticles3D::get_transform_align);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emitting"), "set_emitting", "is_emitting");
|
||||
ADD_PROPERTY_DEFAULT("emitting", true); // Workaround for doctool in headless mode, as dummy rasterizer always returns false.
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "amount", PROPERTY_HINT_RANGE, "1,1000000,1,exp"), "set_amount", "get_amount");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "sub_emitter", PROPERTY_HINT_NODE_PATH_VALID_TYPES, "GPUParticles3D"), "set_sub_emitter", "get_sub_emitter");
|
||||
ADD_GROUP("Time", "");
|
||||
|
|
|
@ -2810,6 +2810,12 @@ RenderingServer::RenderingServer() {
|
|||
PropertyInfo(Variant::INT,
|
||||
"rendering/vulkan/rendering/back_end",
|
||||
PROPERTY_HINT_ENUM, "Forward Clustered (Supports Desktop Only),Forward Mobile (Supports Desktop and Mobile)"));
|
||||
// Already defined in RenderingDeviceVulkan::initialize which runs before this code.
|
||||
// We re-define them here just for doctool's sake. Make sure to keep default values in sync.
|
||||
GLOBAL_DEF("rendering/vulkan/staging_buffer/block_size_kb", 256);
|
||||
GLOBAL_DEF("rendering/vulkan/staging_buffer/max_size_mb", 128);
|
||||
GLOBAL_DEF("rendering/vulkan/staging_buffer/texture_upload_region_size_px", 64);
|
||||
GLOBAL_DEF("rendering/vulkan/descriptor_pools/max_descriptors_per_pool", 64);
|
||||
|
||||
GLOBAL_DEF("rendering/3d/viewport/scale", 1.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/3d/viewport/scale",
|
||||
|
|
Loading…
Reference in New Issue