renderer_vulkan: Move fragment shader microprofile to a better place

This commit is contained in:
GPUCode
2022-11-06 21:57:30 +02:00
parent 479c7ed162
commit 32c6e76ab9
2 changed files with 3 additions and 3 deletions

View File

@ -244,12 +244,10 @@ void PipelineCache::UseTrivialGeometryShader() {
});
}
MICROPROFILE_DEFINE(Vulkan_FragmentGeneration, "Vulkan", "Fragment Shader Compilation", MP_RGB(255, 100, 100));
void PipelineCache::UseFragmentShader(const Pica::Regs& regs) {
const PicaFSConfig config{regs, instance};
scheduler.Record([this, config](vk::CommandBuffer, vk::CommandBuffer) {
MICROPROFILE_SCOPE(Vulkan_FragmentGeneration);
vk::ShaderModule handle = fragment_shaders.Get(config, vk::ShaderStageFlagBits::eFragment,
instance.GetDevice(), ShaderOptimization::Debug);
current_shaders[ProgramType::FS] = handle;

View File

@ -2,7 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <fstream>
#include "common/microprofile.h"
#include "video_core/regs.h"
#include "video_core/renderer_vulkan/vk_shader_gen_spv.h"
#include "video_core/shader/shader_uniforms.h"
@ -893,7 +893,9 @@ void FragmentModule::DefineInterface() {
Decorate(gl_frag_depth_id, spv::Decoration::BuiltIn, spv::BuiltIn::FragDepth);
}
MICROPROFILE_DEFINE(Vulkan_FragmentGenerationSPV, "Vulkan", "SPIRV Fragment Shader Compilation", MP_RGB(255, 100, 100));
std::vector<u32> GenerateFragmentShaderSPV(const PicaFSConfig& config) {
MICROPROFILE_SCOPE(Vulkan_FragmentGenerationSPV)
FragmentModule module{config};
module.Generate();
return module.Assemble();