diff options
author | clayjohn <claynjohn@gmail.com> | 2023-03-02 18:15:21 -0800 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-13 21:43:38 +0100 |
commit | 925381201be45a19e27a7093410033acb214f97c (patch) | |
tree | 96f182584e0f0c32559390b0e03738f32906566b /servers/rendering/renderer_rd/forward_clustered | |
parent | 48a639f4a5919cd8f1713d7ac8376447fb1de2ac (diff) |
Add a few more rendering timestamps
(cherry picked from commit 1adc4e5875782c064759bf810c511ac42b0f2d05)
Diffstat (limited to 'servers/rendering/renderer_rd/forward_clustered')
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp index e0128bfe25..91789201c6 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp @@ -1972,22 +1972,25 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co RD::get_singleton()->draw_list_end(); RD::get_singleton()->draw_command_end_label(); } + if (rb->get_msaa_3d() != RS::VIEWPORT_MSAA_DISABLED) { + RENDER_TIMESTAMP("Resolve MSAA"); - if (!can_continue_color && rb->get_msaa_3d() != RS::VIEWPORT_MSAA_DISABLED) { - // Handle views individual, might want to look at rewriting our resolve to do both layers in one pass. - for (uint32_t v = 0; v < rb->get_view_count(); v++) { - RD::get_singleton()->texture_resolve_multisample(rb_data->get_color_msaa(v), rb->get_internal_texture(v)); - } - if (using_separate_specular) { + if (!can_continue_color) { + // Handle views individual, might want to look at rewriting our resolve to do both layers in one pass. for (uint32_t v = 0; v < rb->get_view_count(); v++) { - RD::get_singleton()->texture_resolve_multisample(rb_data->get_specular_msaa(v), rb_data->get_specular(v)); + RD::get_singleton()->texture_resolve_multisample(rb_data->get_color_msaa(v), rb->get_internal_texture(v)); + } + if (using_separate_specular) { + for (uint32_t v = 0; v < rb->get_view_count(); v++) { + RD::get_singleton()->texture_resolve_multisample(rb_data->get_specular_msaa(v), rb_data->get_specular(v)); + } } } - } - if (!can_continue_depth && rb->get_msaa_3d() != RS::VIEWPORT_MSAA_DISABLED) { - for (uint32_t v = 0; v < rb->get_view_count(); v++) { - resolve_effects->resolve_depth(rb_data->get_depth_msaa(v), rb->get_depth_texture(v), rb->get_internal_size(), texture_multisamples[rb->get_msaa_3d()]); + if (!can_continue_depth) { + for (uint32_t v = 0; v < rb->get_view_count(); v++) { + resolve_effects->resolve_depth(rb_data->get_depth_msaa(v), rb->get_depth_texture(v), rb->get_internal_size(), texture_multisamples[rb->get_msaa_3d()]); + } } } @@ -2016,11 +2019,15 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co } if (scene_state.used_screen_texture) { + RENDER_TIMESTAMP("Copy Screen Texture"); + // Copy screen texture to backbuffer so we can read from it _render_buffers_copy_screen_texture(p_render_data); } if (scene_state.used_depth_texture) { + RENDER_TIMESTAMP("Copy Depth Texture"); + // Copy depth texture to backbuffer so we can read from it _render_buffers_copy_depth_texture(p_render_data); } |