mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
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.
This commit is contained in:
parent
8be9e5b48b
commit
c3c7603076
|
@ -1334,7 +1334,10 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const auto comment = std::get_if<CommentNode>(&*node)) {
|
if (const auto comment = std::get_if<CommentNode>(&*node)) {
|
||||||
Name(OpUndef(t_void), comment->GetText());
|
if (device.HasDebuggingToolAttached()) {
|
||||||
|
// We should insert comments with OpString instead of using named variables
|
||||||
|
Name(OpUndef(t_int), comment->GetText());
|
||||||
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue