File tree 3 files changed +21
-0
lines changed
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,15 @@ impl Global {
345
345
}
346
346
}
347
347
348
+ if let Some ( ( begin, end) ) = beginning_of_pass_write_index. zip ( end_of_pass_write_index) {
349
+ if begin == end {
350
+ return make_err (
351
+ CommandEncoderError :: TimestampWriteIndicesEqual { idx : begin } ,
352
+ arc_desc,
353
+ ) ;
354
+ }
355
+ }
356
+
348
357
Some ( ArcPassTimestampWrites {
349
358
query_set,
350
359
beginning_of_pass_write_index : tw. beginning_of_pass_write_index ,
Original file line number Diff line number Diff line change @@ -654,6 +654,10 @@ pub enum CommandEncoderError {
654
654
InvalidResource ( #[ from] InvalidResourceError ) ,
655
655
#[ error( transparent) ]
656
656
MissingFeatures ( #[ from] MissingFeatures ) ,
657
+ #[ error(
658
+ "begin and end indices of pass timestamp writes are both set to {idx}, which is not allowed"
659
+ ) ]
660
+ TimestampWriteIndicesEqual { idx : u32 } ,
657
661
#[ error( transparent) ]
658
662
TimestampWritesInvalid ( #[ from] QueryUseError ) ,
659
663
}
Original file line number Diff line number Diff line change @@ -1412,6 +1412,14 @@ impl Global {
1412
1412
query_set. validate_query ( SimplifiedQueryType :: Timestamp , idx, None ) ?;
1413
1413
}
1414
1414
1415
+ if let Some ( ( begin, end) ) =
1416
+ beginning_of_pass_write_index. zip ( end_of_pass_write_index)
1417
+ {
1418
+ if begin == end {
1419
+ return Err ( CommandEncoderError :: TimestampWriteIndicesEqual { idx : begin } ) ;
1420
+ }
1421
+ }
1422
+
1415
1423
Some ( ArcPassTimestampWrites {
1416
1424
query_set,
1417
1425
beginning_of_pass_write_index : tw. beginning_of_pass_write_index ,
You can’t perform that action at this time.
0 commit comments