mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-25 20:36:54 +01:00
pipeline: log real shader compiles to the console
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <atomic>
|
||||
#include <cctype>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fmt/format.h>
|
||||
#include <limits>
|
||||
@@ -313,6 +314,16 @@ ShaderModule& PipelineCache::CompileModule(Program& program, const ProgramKey& k
|
||||
.function_code = {function_code.begin(), function_code.end()},
|
||||
});
|
||||
EXIT_IF(module.module == nullptr);
|
||||
m_compiled[static_cast<size_t>(key.stage)]++;
|
||||
// Guest geometry shaders are compiled through the host mesh stage.
|
||||
std::printf("Shaders: VS %u | PS %u | CS %u | GS %u | LS %u | HS %u | TES %u\n",
|
||||
m_compiled[static_cast<size_t>(ShaderType::Vertex)],
|
||||
m_compiled[static_cast<size_t>(ShaderType::Pixel)],
|
||||
m_compiled[static_cast<size_t>(ShaderType::Compute)],
|
||||
m_compiled[static_cast<size_t>(ShaderType::Mesh)],
|
||||
m_compiled[static_cast<size_t>(ShaderType::Local)],
|
||||
m_compiled[static_cast<size_t>(ShaderType::TessellationControl)],
|
||||
m_compiled[static_cast<size_t>(ShaderType::TessellationEvaluation)]);
|
||||
// The inputs of these come from the stage's static key.
|
||||
if (key.stage == ShaderType::Vertex || key.stage == ShaderType::Local) {
|
||||
module.vertex_formats = VertexInputFormats(*options.input_info.vertex, module.info);
|
||||
|
||||
@@ -200,6 +200,8 @@ private:
|
||||
GraphicContext& m_graphics;
|
||||
ShaderRecompiler::IR::ImageHeapSource* m_image_heap;
|
||||
std::unordered_map<ProgramKey, Program, ProgramKeyHash> m_program_cache;
|
||||
// Modules compiled per stage.
|
||||
std::array<uint32_t, static_cast<size_t>(ShaderType::TessellationEvaluation) + 1> m_compiled {};
|
||||
ProgramKey m_lookup_key;
|
||||
vk::PipelineCache m_driver_cache = nullptr;
|
||||
std::filesystem::path m_driver_cache_path;
|
||||
|
||||
Reference in New Issue
Block a user