diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 09:23:32 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 09:23:32 +0200 |
commit | 3306ffefd1d00ac5cec0783b9a34633d2d1a6ab3 (patch) | |
tree | 2e12dca57068f3b97e9f47edaf1b300ee867627d /servers | |
parent | 28f642097a7986867e4fb7d697764efb4db753bf (diff) | |
parent | 24ff2929997302e54d4ed1b2a6787c814b22ee5a (diff) |
Merge pull request #67000 from RandomShaper/split_render_further
Polish rendering driver refactor further
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/shader_rd.cpp | 1 | ||||
-rw-r--r-- | servers/rendering_server.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp index 0f2dea6fe9..5e9eadadd9 100644 --- a/servers/rendering/renderer_rd/shader_rd.cpp +++ b/servers/rendering/renderer_rd/shader_rd.cpp @@ -180,6 +180,7 @@ void ShaderRD::_build_variant_code(StringBuilder &builder, uint32_t p_variant, c #if defined(MACOS_ENABLED) || defined(IOS_ENABLED) builder.append("#define MOLTENVK_USED\n"); #endif + builder.append(String("#define RENDER_DRIVER_") + OS::get_singleton()->get_current_rendering_driver_name().to_upper() + "\n"); } break; case StageTemplate::Chunk::TYPE_MATERIAL_UNIFORMS: { builder.append(p_version->uniforms.get_data()); //uniforms (same for vertex and fragment) diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 627cd9f062..e12c4fc79a 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -2868,12 +2868,13 @@ void RenderingServer::init() { GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048); - // Already defined in RenderingDeviceVulkan::initialize which runs before this code. + // Already defined in some RenderingDevice*::initialize, which run before this code. // We re-define them here just for doctool's sake. Make sure to keep default values in sync. GLOBAL_DEF("rendering/rendering_device/staging_buffer/block_size_kb", 256); GLOBAL_DEF("rendering/rendering_device/staging_buffer/max_size_mb", 128); GLOBAL_DEF("rendering/rendering_device/staging_buffer/texture_upload_region_size_px", 64); - GLOBAL_DEF("rendering/rendering_device/descriptor_pools/max_descriptors_per_pool", 64); + // Vulkan-specific. + GLOBAL_DEF("rendering/rendering_device/vulkan/max_descriptors_per_pool", 64); // Number of commands that can be drawn per frame. GLOBAL_DEF_RST("rendering/gl_compatibility/item_buffer_size", 16384); |