1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Visual GPU profiler and related profiling support in Vulkan.

This commit is contained in:
Juan Linietsky
2019-09-20 17:58:06 -03:00
parent dc32083681
commit 123ee5995c
23 changed files with 1418 additions and 17 deletions

View File

@@ -3656,6 +3656,31 @@ RasterizerEffectsRD *RasterizerStorageRD::get_effects() {
return &effects;
}
void RasterizerStorageRD::capture_timestamps_begin() {
RD::get_singleton()->capture_timestamp("Frame Begin", false);
}
void RasterizerStorageRD::capture_timestamp(const String &p_name) {
RD::get_singleton()->capture_timestamp(p_name, true);
}
uint32_t RasterizerStorageRD::get_captured_timestamps_count() const {
return RD::get_singleton()->get_captured_timestamps_count();
}
uint64_t RasterizerStorageRD::get_captured_timestamps_frame() const {
return RD::get_singleton()->get_captured_timestamps_frame();
}
uint64_t RasterizerStorageRD::get_captured_timestamp_gpu_time(uint32_t p_index) const {
return RD::get_singleton()->get_captured_timestamp_gpu_time(p_index);
}
uint64_t RasterizerStorageRD::get_captured_timestamp_cpu_time(uint32_t p_index) const {
return RD::get_singleton()->get_captured_timestamp_cpu_time(p_index);
}
String RasterizerStorageRD::get_captured_timestamp_name(uint32_t p_index) const {
return RD::get_singleton()->get_captured_timestamp_name(p_index);
}
RasterizerStorageRD::RasterizerStorageRD() {
for (int i = 0; i < SHADER_TYPE_MAX; i++) {