mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-19 18:36:53 +02:00
shader: report compiled counts by guest stage
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#include "loader/systemContent.h"
|
#include "loader/systemContent.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <array>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
@@ -365,7 +366,16 @@ struct PipelineCache::ProgramCache {
|
|||||||
input_info.stage = {.program = &permutation.program, .resources = std::move(resources)};
|
input_info.stage = {.program = &permutation.program, .resources = std::move(resources)};
|
||||||
permutation.program.bindings.AdvancePushData(push_data_cursor);
|
permutation.program.bindings.AdvancePushData(push_data_cursor);
|
||||||
|
|
||||||
std::printf("Num compiled %" PRIu64 " shaders\n", next_shader_id);
|
std::array<size_t, static_cast<size_t>(ShaderType::Mesh) + 1> counts {};
|
||||||
|
for (const auto& [key, source]: programs) {
|
||||||
|
counts[static_cast<size_t>(key.stage)] += source.permutations.size();
|
||||||
|
}
|
||||||
|
// Guest geometry shaders are compiled through the host mesh stage.
|
||||||
|
std::printf("Shaders: VS %zu | PS %zu | CS %zu | GS %zu\n",
|
||||||
|
counts[static_cast<size_t>(ShaderType::Vertex)],
|
||||||
|
counts[static_cast<size_t>(ShaderType::Pixel)],
|
||||||
|
counts[static_cast<size_t>(ShaderType::Compute)],
|
||||||
|
counts[static_cast<size_t>(ShaderType::Mesh)]);
|
||||||
return permutation.handle;
|
return permutation.handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user