mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 12:08:14 -05:00
Implemented Control Codes
This commit is contained in:
@ -351,6 +351,15 @@ public:
|
||||
shader.AddLine(dest + " = " + src + ';');
|
||||
}
|
||||
|
||||
std::string GetControlCode(const Tegra::Shader::ControlCode cc) {
|
||||
u32 code = static_cast<u32>(cc);
|
||||
return "controlCode_" + std::to_string(code);
|
||||
}
|
||||
|
||||
void SetControlCode(const Tegra::Shader::ControlCode cc, const std::string& value) {
|
||||
shader.AddLine(GetControlCode(cc) + " = " + value + ';');
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes code that does a output attribute assignment to register operation. Output attributes
|
||||
* are stored as floats, so this may require conversion.
|
||||
@ -414,6 +423,12 @@ public:
|
||||
}
|
||||
declarations.AddNewLine();
|
||||
|
||||
for (u32 cc = 0; cc < 32; cc++) {
|
||||
Tegra::Shader::ControlCode code = static_cast<Tegra::Shader::ControlCode>(cc);
|
||||
declarations.AddLine("bool " + GetControlCode(code) + " = false;");
|
||||
}
|
||||
declarations.AddNewLine();
|
||||
|
||||
for (const auto element : declr_input_attribute) {
|
||||
// TODO(bunnei): Use proper number of elements for these
|
||||
u32 idx =
|
||||
|
Reference in New Issue
Block a user