diff options
| author | 2020-03-12 03:27:29 -0300 | |
|---|---|---|
| committer | 2020-03-13 18:33:05 -0300 | |
| commit | 69c7a01f88a1839a3d950cab968accfa5100ea18 (patch) | |
| tree | 58c80a2133092b990ca11f3a357d70fab2c5fd0b /src/video_core | |
| parent | vk_shader_decompiler: Fix default varying regression (diff) | |
| download | yuzu-69c7a01f88a1839a3d950cab968accfa5100ea18.tar.gz yuzu-69c7a01f88a1839a3d950cab968accfa5100ea18.tar.xz yuzu-69c7a01f88a1839a3d950cab968accfa5100ea18.zip | |
vk/gl_shader_decompiler: Silence assertion on compute
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 973d3fd11..3adf7f0cb 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -408,8 +408,11 @@ public: | |||
| 408 | explicit GLSLDecompiler(const Device& device, const ShaderIR& ir, const Registry& registry, | 408 | explicit GLSLDecompiler(const Device& device, const ShaderIR& ir, const Registry& registry, |
| 409 | ShaderType stage, std::string_view identifier, std::string_view suffix) | 409 | ShaderType stage, std::string_view identifier, std::string_view suffix) |
| 410 | : device{device}, ir{ir}, registry{registry}, stage{stage}, | 410 | : device{device}, ir{ir}, registry{registry}, stage{stage}, |
| 411 | identifier{identifier}, suffix{suffix}, header{ir.GetHeader()}, | 411 | identifier{identifier}, suffix{suffix}, header{ir.GetHeader()} { |
| 412 | transform_feedback{BuildTransformFeedback(registry.GetGraphicsInfo())} {} | 412 | if (stage != ShaderType::Compute) { |
| 413 | transform_feedback = BuildTransformFeedback(registry.GetGraphicsInfo()); | ||
| 414 | } | ||
| 415 | } | ||
| 413 | 416 | ||
| 414 | void Decompile() { | 417 | void Decompile() { |
| 415 | DeclareHeader(); | 418 | DeclareHeader(); |
| @@ -2553,7 +2556,7 @@ private: | |||
| 2553 | const std::string_view identifier; | 2556 | const std::string_view identifier; |
| 2554 | const std::string_view suffix; | 2557 | const std::string_view suffix; |
| 2555 | const Header header; | 2558 | const Header header; |
| 2556 | const std::unordered_map<u8, VaryingTFB> transform_feedback; | 2559 | std::unordered_map<u8, VaryingTFB> transform_feedback; |
| 2557 | 2560 | ||
| 2558 | ShaderWriter code; | 2561 | ShaderWriter code; |
| 2559 | 2562 | ||
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 7d51bf9af..b2c298051 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |||
| @@ -277,8 +277,11 @@ public: | |||
| 277 | explicit SPIRVDecompiler(const VKDevice& device, const ShaderIR& ir, ShaderType stage, | 277 | explicit SPIRVDecompiler(const VKDevice& device, const ShaderIR& ir, ShaderType stage, |
| 278 | const Registry& registry, const Specialization& specialization) | 278 | const Registry& registry, const Specialization& specialization) |
| 279 | : Module(0x00010300), device{device}, ir{ir}, stage{stage}, header{ir.GetHeader()}, | 279 | : Module(0x00010300), device{device}, ir{ir}, stage{stage}, header{ir.GetHeader()}, |
| 280 | registry{registry}, specialization{specialization}, | 280 | registry{registry}, specialization{specialization} { |
| 281 | transform_feedback{BuildTransformFeedback(registry.GetGraphicsInfo())} { | 281 | if (stage != ShaderType::Compute) { |
| 282 | transform_feedback = BuildTransformFeedback(registry.GetGraphicsInfo()); | ||
| 283 | } | ||
| 284 | |||
| 282 | AddCapability(spv::Capability::Shader); | 285 | AddCapability(spv::Capability::Shader); |
| 283 | AddCapability(spv::Capability::UniformAndStorageBuffer16BitAccess); | 286 | AddCapability(spv::Capability::UniformAndStorageBuffer16BitAccess); |
| 284 | AddCapability(spv::Capability::ImageQuery); | 287 | AddCapability(spv::Capability::ImageQuery); |
| @@ -2581,7 +2584,7 @@ private: | |||
| 2581 | const Tegra::Shader::Header header; | 2584 | const Tegra::Shader::Header header; |
| 2582 | const Registry& registry; | 2585 | const Registry& registry; |
| 2583 | const Specialization& specialization; | 2586 | const Specialization& specialization; |
| 2584 | const std::unordered_map<u8, VaryingTFB> transform_feedback; | 2587 | std::unordered_map<u8, VaryingTFB> transform_feedback; |
| 2585 | 2588 | ||
| 2586 | const Id t_void = Name(TypeVoid(), "void"); | 2589 | const Id t_void = Name(TypeVoid(), "void"); |
| 2587 | 2590 | ||