Skip to content

Commit

Permalink
Reduce SmallVector size
Browse files Browse the repository at this point in the history
  • Loading branch information
sergcpp committed Nov 29, 2024
1 parent 9273377 commit 38686da
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 110 deletions.
2 changes: 1 addition & 1 deletion internal/Dx/ProgramDX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ bool Ray::Dx::Program::InitRootSignature(ILog *log) {
for (const Descr &u : sh.unif_bindings) {
const int rp_index = (u.input_type == D3D_SIT_SAMPLER) ? 1 : (u.space != 0) ? 2 : 0;

if (u.loc >= descr_indices_[rp_index].size()) {
if (u.loc >= int(descr_indices_[rp_index].size())) {
descr_indices_[rp_index].resize(std::max(u.loc + 1, int(descr_indices_[rp_index].size())), -1);
}
descr_indices_[rp_index][u.loc] = descriptor_count[rp_index];
Expand Down
Loading

0 comments on commit 38686da

Please sign in to comment.