mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-23 20:05:01 +00:00
video: Import new shader recompiler + display a triangle (#142)
This commit is contained in:
parent
8cf64a33b2
commit
8730968385
103 changed files with 17793 additions and 729 deletions
50
src/shader_recompiler/ir/condition.h
Normal file
50
src/shader_recompiler/ir/condition.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Shader::IR {
|
||||
|
||||
enum class Condition : u32 {
|
||||
False,
|
||||
True,
|
||||
Scc0,
|
||||
Scc1,
|
||||
Vccz,
|
||||
Vccnz,
|
||||
Execz,
|
||||
Execnz,
|
||||
};
|
||||
|
||||
constexpr std::string_view NameOf(Condition condition) {
|
||||
switch (condition) {
|
||||
case Condition::False:
|
||||
return "False";
|
||||
case Condition::True:
|
||||
return "True";
|
||||
case Condition::Scc0:
|
||||
return "Scc0";
|
||||
case Condition::Scc1:
|
||||
return "Scc1";
|
||||
case Condition::Vccz:
|
||||
return "Vccz";
|
||||
case Condition::Vccnz:
|
||||
return "Vccnz";
|
||||
case Condition::Execz:
|
||||
return "Execz";
|
||||
case Condition::Execnz:
|
||||
return "Execnz";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Shader::IR
|
||||
|
||||
template <>
|
||||
struct fmt::formatter<Shader::IR::Condition> : formatter<std::string_view> {
|
||||
auto format(const Shader::IR::Condition& cond, format_context& ctx) const {
|
||||
return formatter<string_view>::format(NameOf(cond), ctx);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue