diff options
| author | 2021-01-15 20:33:06 -0300 | |
|---|---|---|
| committer | 2021-01-15 21:12:57 -0300 | |
| commit | c3c7603076d71789b9268f456b31fac2da157b55 (patch) | |
| tree | b62f3854b64c00562e3be47bb2da458da4976a94 /src | |
| parent | Merge pull request #5358 from ReinUsesLisp/rename-insert-padding (diff) | |
| download | yuzu-c3c7603076d71789b9268f456b31fac2da157b55.tar.gz yuzu-c3c7603076d71789b9268f456b31fac2da157b55.tar.xz yuzu-c3c7603076d71789b9268f456b31fac2da157b55.zip | |
vk_shader_decompiler: Show comments as OpUndef with a type
Silence the new validation layer error about SPIR-V not allowing OpUndef
on a OpTypeVoid, even when the SPIR-V spec doesn't say anything against
it.
They will be inserted as an undefined int to avoid SPIRV-Cross and
validation errors, but only when a debugging tool is attached.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 89cbe01ad..61d52b961 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |||
| @@ -1334,7 +1334,10 @@ private: | |||
| 1334 | } | 1334 | } |
| 1335 | 1335 | ||
| 1336 | if (const auto comment = std::get_if<CommentNode>(&*node)) { | 1336 | if (const auto comment = std::get_if<CommentNode>(&*node)) { |
| 1337 | Name(OpUndef(t_void), comment->GetText()); | 1337 | if (device.HasDebuggingToolAttached()) { |
| 1338 | // We should insert comments with OpString instead of using named variables | ||
| 1339 | Name(OpUndef(t_int), comment->GetText()); | ||
| 1340 | } | ||
| 1338 | return {}; | 1341 | return {}; |
| 1339 | } | 1342 | } |
| 1340 | 1343 | ||