summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorGravatar Kelebek12023-08-03 12:18:35 +0100
committerGravatar Kelebek12023-08-03 15:30:27 +0100
commitdfb7fc8293a528d6c8cc2abef7fac5a6a7bf2883 (patch)
treefaf1c9bce2d7159b0f9b7bb3cdd08be7f47f7847 /src/video_core/renderer_opengl
parentMerge pull request #11202 from abouvier/vulkan-config (diff)
downloadyuzu-dfb7fc8293a528d6c8cc2abef7fac5a6a7bf2883.tar.gz
yuzu-dfb7fc8293a528d6c8cc2abef7fac5a6a7bf2883.tar.xz
yuzu-dfb7fc8293a528d6c8cc2abef7fac5a6a7bf2883.zip
Fix shader dumps with nvdisasm
skip fragment shaders when rasterizer is disabled initialize env_ptrs
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 618cb6354..2888e0238 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -445,7 +445,8 @@ std::unique_ptr<GraphicsPipeline> ShaderCache::CreateGraphicsPipeline(
445 ShaderContext::ShaderPools& pools, const GraphicsPipelineKey& key, 445 ShaderContext::ShaderPools& pools, const GraphicsPipelineKey& key,
446 std::span<Shader::Environment* const> envs, bool use_shader_workers, 446 std::span<Shader::Environment* const> envs, bool use_shader_workers,
447 bool force_context_flush) try { 447 bool force_context_flush) try {
448 LOG_INFO(Render_OpenGL, "0x{:016x}", key.Hash()); 448 auto hash = key.Hash();
449 LOG_INFO(Render_OpenGL, "0x{:016x}", hash);
449 size_t env_index{}; 450 size_t env_index{};
450 u32 total_storage_buffers{}; 451 u32 total_storage_buffers{};
451 std::array<Shader::IR::Program, Maxwell::MaxShaderProgram> programs; 452 std::array<Shader::IR::Program, Maxwell::MaxShaderProgram> programs;
@@ -474,7 +475,7 @@ std::unique_ptr<GraphicsPipeline> ShaderCache::CreateGraphicsPipeline(
474 Shader::Maxwell::Flow::CFG cfg(env, pools.flow_block, cfg_offset, index == 0); 475 Shader::Maxwell::Flow::CFG cfg(env, pools.flow_block, cfg_offset, index == 0);
475 476
476 if (Settings::values.dump_shaders) { 477 if (Settings::values.dump_shaders) {
477 env.Dump(key.unique_hashes[index]); 478 env.Dump(hash, key.unique_hashes[index]);
478 } 479 }
479 480
480 if (!uses_vertex_a || index != 1) { 481 if (!uses_vertex_a || index != 1) {
@@ -566,12 +567,13 @@ std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline(
566std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline( 567std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline(
567 ShaderContext::ShaderPools& pools, const ComputePipelineKey& key, Shader::Environment& env, 568 ShaderContext::ShaderPools& pools, const ComputePipelineKey& key, Shader::Environment& env,
568 bool force_context_flush) try { 569 bool force_context_flush) try {
569 LOG_INFO(Render_OpenGL, "0x{:016x}", key.Hash()); 570 auto hash = key.Hash();
571 LOG_INFO(Render_OpenGL, "0x{:016x}", hash);
570 572
571 Shader::Maxwell::Flow::CFG cfg{env, pools.flow_block, env.StartAddress()}; 573 Shader::Maxwell::Flow::CFG cfg{env, pools.flow_block, env.StartAddress()};
572 574
573 if (Settings::values.dump_shaders) { 575 if (Settings::values.dump_shaders) {
574 env.Dump(key.Hash()); 576 env.Dump(hash, key.unique_hash);
575 } 577 }
576 578
577 auto program{TranslateProgram(pools.inst, pools.block, env, cfg, host_info)}; 579 auto program{TranslateProgram(pools.inst, pools.block, env, cfg, host_info)};