Shader_IR: Address feedback.

This commit is contained in:
Fernando Sahmkow 2020-01-24 10:44:34 -04:00 committed by FernandoS27
parent 806f569143
commit bb8eb15d39
10 changed files with 40 additions and 36 deletions

View file

@ -505,11 +505,11 @@ private:
}
void DeclareCustomVariables() {
const u32 cv_num = ir.GetCustomVariablesAmount();
for (u32 i = 0; i < cv_num; ++i) {
const u32 num_custom_variables = ir.GetNumCustomVariables();
for (u32 i = 0; i < num_custom_variables; ++i) {
code.AddLine("float {} = 0.0f;", GetCustomVariable(i));
}
if (cv_num > 0) {
if (num_custom_variables > 0) {
code.AddNewLine();
}
}