Commit caa8009 1 parent 711f2a7 commit caa8009 Copy full SHA for caa8009
File tree 2 files changed +12
-6
lines changed
2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -868,7 +868,9 @@ vkCmdPushConstantsArgs {
868
868
sub void dovkCmdPushConstants(ref!vkCmdPushConstantsArgs args) {
869
869
_ = PipelineLayouts[args.Layout]
870
870
pushConstants := lastPushConstants()
871
- write(pushConstants.Data[args.Offset:args.Offset+args.Size])
871
+ if pushConstants != null {
872
+ write(pushConstants.Data[args.Offset:args.Offset+args.Size])
873
+ }
872
874
}
873
875
874
876
@indirect("VkCommandBuffer", "VkDevice")
@@ -899,8 +901,10 @@ cmd void vkCmdPushConstants(
899
901
sub void readPushConstants(VkPipelineBindPoint bindPoint) {
900
902
layout := boundPipelineLayout(bindPoint)
901
903
pushConstants := lastPushConstants()
902
- for _, _, r in layout.PushConstantRanges {
903
- read(pushConstants.Data[r.offset:r.offset+r.size])
904
+ if pushConstants != null {
905
+ for _, _, r in layout.PushConstantRanges {
906
+ read(pushConstants.Data[r.offset:r.offset+r.size])
907
+ }
904
908
}
905
909
}
906
910
Original file line number Diff line number Diff line change @@ -436,9 +436,11 @@ sub void readWriteMemoryInBoundComputeDescriptorSets() {
436
436
437
437
sub ref!DynamicStateSet unpackDynamicState(ref!DynamicData data) {
438
438
obj := new!DynamicStateSet()
439
- for _, _, s in data.DynamicStates {
440
- if as!s32(s) < 9 {
441
- obj.contains[as!s32(s)] = true
439
+ if data != null {
440
+ for _, _, s in data.DynamicStates {
441
+ if as!s32(s) < 9 {
442
+ obj.contains[as!s32(s)] = true
443
+ }
442
444
}
443
445
}
444
446
return obj
You can’t perform that action at this time.
0 commit comments