Skip to content

Commit

Permalink
fix error message runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 7, 2024
1 parent 5e42076 commit ba11ffd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shdc/spirv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ static bool compile(Input& inp, EShLanguage stage, Slang::Enum slang, const Merg
if (slot == -1) {
inp.smp_slots[name] = binding;
} else if (slot != binding) {
out_spirv.errors.push_back(inp.error(0, fmt::format("binding collision for sampler '{}' ({} vs {})", name, slot)));
out_spirv.errors.push_back(inp.error(0, fmt::format("binding collision for sampler '{}' ({} vs {})", name, slot, binding)));
return false;
}
} else if (uniform.getType()->isTexture()) {
const int slot = inp.find_img_slot(name);
if (slot == -1) {
inp.img_slots[name] = binding;
} else if (slot != binding) {
out_spirv.errors.push_back(inp.error(0, fmt::format("binding collision for image '{}' ({} vs {})", name, slot)));
out_spirv.errors.push_back(inp.error(0, fmt::format("binding collision for image '{}' ({} vs {})", name, slot, binding)));
return false;
}
}
Expand Down

0 comments on commit ba11ffd

Please sign in to comment.