mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-16 07:57:56 -05:00
vk_shader_compiler: Implement the decompiler in SPIR-V
This commit is contained in:
committed by
FernandoS27
parent
0366c18d87
commit
ca9901867e
@ -205,13 +205,29 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void MarkLabelUnused() const {
|
||||
void MarkLabelUnused() {
|
||||
auto inner = std::get_if<ASTLabel>(&data);
|
||||
if (inner) {
|
||||
inner->unused = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsLabelUnused() const {
|
||||
auto inner = std::get_if<ASTLabel>(&data);
|
||||
if (inner) {
|
||||
return inner->unused;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
u32 GetLabelIndex() const {
|
||||
auto inner = std::get_if<ASTLabel>(&data);
|
||||
if (inner) {
|
||||
return inner->index;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Expr GetIfCondition() const {
|
||||
auto inner = std::get_if<ASTIfThen>(&data);
|
||||
if (inner) {
|
||||
@ -336,6 +352,10 @@ public:
|
||||
return variables;
|
||||
}
|
||||
|
||||
const std::vector<ASTNode>& GetLabels() const {
|
||||
return labels;
|
||||
}
|
||||
|
||||
private:
|
||||
bool IsBackwardsJump(ASTNode goto_node, ASTNode label_node) const;
|
||||
|
||||
|
Reference in New Issue
Block a user