Skip to content

Commit 75ff338

Browse files
committed
[fix] instance validation assertions.
1 parent 6fa1a35 commit 75ff338

File tree

1 file changed

+12
-8
lines changed
  • crates/lambda-rs/src/render

1 file changed

+12
-8
lines changed

crates/lambda-rs/src/render/mod.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -918,11 +918,13 @@ impl RenderContext {
918918
{
919919
return Err(RenderError::Configuration(msg));
920920
}
921+
}
922+
#[cfg(any(
923+
debug_assertions,
924+
feature = "render-instancing-validation",
925+
))]
926+
{
921927
if instances.start == instances.end {
922-
#[cfg(any(
923-
debug_assertions,
924-
feature = "render-instancing-validation",
925-
))]
926928
logging::debug!(
927929
"Skipping Draw with empty instance range {}..{}",
928930
instances.start,
@@ -1002,11 +1004,13 @@ impl RenderContext {
10021004
{
10031005
return Err(RenderError::Configuration(msg));
10041006
}
1007+
}
1008+
#[cfg(any(
1009+
debug_assertions,
1010+
feature = "render-instancing-validation",
1011+
))]
1012+
{
10051013
if instances.start == instances.end {
1006-
#[cfg(any(
1007-
debug_assertions,
1008-
feature = "render-instancing-validation",
1009-
))]
10101014
logging::debug!(
10111015
"Skipping DrawIndexed with empty instance range {}..{}",
10121016
instances.start,

0 commit comments

Comments
 (0)