Skip to content

Commit

Permalink
fix uniform array formatting in C, Odin and Rust generators
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Aug 8, 2024
1 parent 1af4075 commit 9300010
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/shdc/generators/sokold.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void SokolDGenerator::gen_shader_desc_func(const GenInput& gen, const ProgramRef
const std::string un = fmt::format("{}.uniforms[{}]", ubn, u_index);
l("{}.name = \"{}.{}\";\n", un, ub->inst_name, u.name);
l("{}.type = {};\n", un, uniform_type(u.type));
l(".array_count = {};\n", un, u.array_count);
l("{}.array_count = {};\n", un, u.array_count);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/shdc/generators/sokolodin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void SokolOdinGenerator::gen_shader_desc_func(const GenInput& gen, const Program
const std::string un = fmt::format("{}.uniforms[{}]", ubn, u_index);
l("{}.name = \"{}.{}\"\n", un, ub->inst_name, u.name);
l("{}.type = {}\n", un, uniform_type(u.type));
l(".array_count = {}\n", un, u.array_count);
l("{}.array_count = {}\n", un, u.array_count);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/shdc/generators/sokolrust.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void SokolRustGenerator::gen_shader_desc_func(const GenInput& gen, const Program
const std::string un = fmt::format("{}.uniforms[{}]", ubn, u_index);
l("{}.name = c\"{}:{}\".as_ptr();\n", un, ub->inst_name, u.name);
l("{}._type = {};\n", un, uniform_type(u.type));
l(".array_count = {};\n", un, u.array_count);
l("{}.array_count = {};\n", un, u.array_count);
}
}
}
Expand Down

0 comments on commit 9300010

Please sign in to comment.