Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankvdStam committed Apr 28, 2024
1 parent 8841f5e commit 81457eb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/renderer/backend/dx11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,12 +823,20 @@ impl StateBackup {

device_context.PSSetShader(
self.pixel_shader.as_ref(),
if self.ps_instances_count > 0 { Some(slice::from_raw_parts(self.ps_instances, self.ps_instances_count as usize)) } else { None },
if self.ps_instances_count > 0 {
Some(slice::from_raw_parts(self.ps_instances, self.ps_instances_count as usize))
} else {
None
},
);

device_context.VSSetShader(
self.vertex_shader.as_ref(),
if self.vs_instances_count > 0 { Some(slice::from_raw_parts(self.vs_instances, self.vs_instances_count as usize)) } else { None },
if self.vs_instances_count > 0 {
Some(slice::from_raw_parts(self.vs_instances, self.vs_instances_count as usize))
} else {
None
},
);

device_context.IASetVertexBuffers(
Expand Down

0 comments on commit 81457eb

Please sign in to comment.