forked from KhronosGroup/Vulkan-ValidationLayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
core_validation.h
1625 lines (1474 loc) · 140 KB
/
core_validation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Copyright (c) 2015-2021 The Khronos Group Inc.
* Copyright (c) 2015-2021 Valve Corporation
* Copyright (c) 2015-2021 LunarG, Inc.
* Copyright (C) 2015-2021 Google Inc.
* Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Author: Courtney Goeltzenleuchter <[email protected]>
* Author: Tobin Ehlis <[email protected]>
* Author: Chris Forbes <[email protected]>
* Author: Mark Lobodzinski <[email protected]>
* Author: Dave Houlton <[email protected]>
* Author: Jeremy Kniager <[email protected]>
* Author: Tobias Hector <[email protected]>
*/
#pragma once
#include "state_tracker.h"
#include "image_layout_map.h"
#include "gpu_validation.h"
#include "shader_validation.h"
#include "core_error_location.h"
#include "qfo_transfer.h"
#include "cmd_buffer_state.h"
#include "render_pass_state.h"
// Set of VUID that need to go between core_validation.cpp and drawdispatch.cpp
struct DrawDispatchVuid {
const char* pipeline_bound = kVUIDUndefined;
const char* dynamic_state = kVUIDUndefined;
const char* vertex_binding = kVUIDUndefined;
const char* vertex_binding_null = kVUIDUndefined;
const char* compatible_pipeline = kVUIDUndefined;
const char* render_pass_compatible = kVUIDUndefined;
const char* subpass_index = kVUIDUndefined;
const char* sample_location = kVUIDUndefined;
const char* linear_sampler = kVUIDUndefined;
const char* cubic_sampler = kVUIDUndefined;
const char* indirect_protected_cb = kVUIDUndefined;
const char* indirect_contiguous_memory = kVUIDUndefined;
const char* indirect_buffer_bit = kVUIDUndefined;
const char* viewport_count = kVUIDUndefined;
const char* scissor_count = kVUIDUndefined;
const char* viewport_scissor_count = kVUIDUndefined;
const char* primitive_topology = kVUIDUndefined;
const char* corner_sampled_address_mode = kVUIDUndefined;
// subpass input doesn't validate anything because those checks were done in ValidateCreateGraphicsPipelines
const char* subpass_input = kVUIDUndefined;
const char* imageview_atomic = kVUIDUndefined;
const char* push_constants_set = kVUIDUndefined;
const char* image_subresources = kVUIDUndefined;
const char* descriptor_valid = kVUIDUndefined;
const char* sampler_imageview_type = kVUIDUndefined;
const char* sampler_implicitLod_dref_proj = kVUIDUndefined;
const char* sampler_bias_offset = kVUIDUndefined;
const char* vertex_binding_attribute = kVUIDUndefined;
const char* dynamic_state_setting_commands = kVUIDUndefined;
const char* rasterization_samples = kVUIDUndefined;
const char* unprotected_command_buffer = kVUIDUndefined;
const char* protected_command_buffer = kVUIDUndefined;
const char* ray_query_protected_cb = kVUIDUndefined;
// TODO: Some instance values are in VkBuffer. The validation in those Cmds is skipped.
const char* max_multiview_instance_index = kVUIDUndefined;
const char* img_filter_cubic = kVUIDUndefined;
const char* filter_cubic = kVUIDUndefined;
const char* filter_cubic_min_max = kVUIDUndefined;
const char* viewport_count_primitive_shading_rate = kVUIDUndefined;
const char* patch_control_points = kVUIDUndefined;
const char* rasterizer_discard_enable = kVUIDUndefined;
const char* depth_bias_enable = kVUIDUndefined;
const char* logic_op = kVUIDUndefined;
const char* primitive_restart_enable = kVUIDUndefined;
const char* vertex_input_binding_stride = kVUIDUndefined;
const char* vertex_input = kVUIDUndefined;
const char* blend_enable = kVUIDUndefined;
};
struct ValidateBeginQueryVuids {
const char* vuid_queue_flags = kVUIDUndefined;
const char* vuid_queue_feedback = kVUIDUndefined;
const char* vuid_queue_occlusion = kVUIDUndefined;
const char* vuid_precise = kVUIDUndefined;
const char* vuid_query_count = kVUIDUndefined;
const char* vuid_profile_lock = kVUIDUndefined;
const char* vuid_scope_not_first = kVUIDUndefined;
const char* vuid_scope_in_rp = kVUIDUndefined;
const char* vuid_dup_query_type = kVUIDUndefined;
const char* vuid_protected_cb = kVUIDUndefined;
};
struct ValidateEndQueryVuids {
const char* vuid_queue_flags = kVUIDUndefined;
const char* vuid_active_queries = kVUIDUndefined;
const char* vuid_protected_cb = kVUIDUndefined;
};
struct SubresourceRangeErrorCodes {
const char *base_mip_err, *mip_count_err, *base_layer_err, *layer_count_err;
};
class CoreChecks : public ValidationStateTracker {
public:
using StateTracker = ValidationStateTracker;
using Location = core_error::Location;
using Func = core_error::Func;
using Struct = core_error::Struct;
using Field = core_error::Field;
GlobalQFOTransferBarrierMap<QFOImageTransferBarrier> qfo_release_image_barrier_map;
GlobalQFOTransferBarrierMap<QFOBufferTransferBarrier> qfo_release_buffer_barrier_map;
GlobalImageLayoutMap imageLayoutMap;
VkValidationCacheEXT core_validation_cache = VK_NULL_HANDLE;
std::string validation_cache_path;
CoreChecks() { container_type = LayerObjectTypeCoreValidation; }
const CMD_BUFFER_STATE* GetCBState(const VkCommandBuffer cb) const { return Get<CMD_BUFFER_STATE>(cb); }
CMD_BUFFER_STATE* GetCBState(const VkCommandBuffer cb) { return Get<CMD_BUFFER_STATE>(cb); }
const PHYSICAL_DEVICE_STATE* GetPhysicalDeviceState(VkPhysicalDevice phys) const { return Get<PHYSICAL_DEVICE_STATE>(phys); }
PHYSICAL_DEVICE_STATE* GetPhysicalDeviceState(VkPhysicalDevice phys) { return Get<PHYSICAL_DEVICE_STATE>(phys); }
PHYSICAL_DEVICE_STATE* GetPhysicalDeviceState() { return physical_device_state; }
const PHYSICAL_DEVICE_STATE* GetPhysicalDeviceState() const { return physical_device_state; }
// Override base class, we have some extra work to do here
void InitDeviceValidationObject(bool add_obj, ValidationObject* inst_obj, ValidationObject* dev_obj) override;
struct SimpleErrorLocation {
const char* func_name;
const char* vuid;
const char* FuncName() const { return func_name; }
const std::string Vuid() const { return vuid; }
SimpleErrorLocation(const char* func_name_, const char* vuid_) : func_name(func_name_), vuid(vuid_) {}
};
bool VerifyQueueStateToSeq(const QUEUE_STATE* initial_queue, uint64_t initial_seq) const;
bool ValidateSetMemBinding(VkDeviceMemory mem, const VulkanTypedHandle& typed_handle, const char* apiName) const;
bool ValidateDeviceQueueFamily(uint32_t queue_family, const char* cmd_name, const char* parameter_name, const char* error_code,
bool optional) const;
bool ValidateBindBufferMemory(VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memoryOffset, const char* api_name) const;
bool ValidateGetImageMemoryRequirements2(const VkImageMemoryRequirementsInfo2* pInfo, const char* func_name) const;
bool CheckCommandBuffersInFlight(const COMMAND_POOL_STATE* pPool, const char* action, const char* error_code) const;
bool CheckCommandBufferInFlight(const CMD_BUFFER_STATE* cb_node, const char* action, const char* error_code) const;
bool VerifyQueueStateToFence(VkFence fence) const;
void StoreMemRanges(VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size);
bool ValidateIdleDescriptorSet(VkDescriptorSet set, const char* func_str) const;
bool SemaphoreWasSignaled(VkSemaphore semaphore) const;
bool ValidatePipelineLocked(std::vector<std::shared_ptr<PIPELINE_STATE>> const& pPipelines, int pipelineIndex) const;
bool ValidatePipelineUnlocked(const PIPELINE_STATE* pPipeline, uint32_t pipelineIndex) const;
bool ValidImageBufferQueue(const CMD_BUFFER_STATE* cb_node, const VulkanTypedHandle& object, uint32_t queueFamilyIndex,
uint32_t count, const uint32_t* indices) const;
bool ValidateFenceForSubmit(const FENCE_STATE* pFence, const char* inflight_vuid, const char* retired_vuid,
const char* func_name) const;
bool ValidateSemaphoresForSubmit(struct SemaphoreSubmitState& state, VkQueue queue, const VkSubmitInfo* submit,
const Location& loc) const;
bool ValidateSemaphoresForSubmit(struct SemaphoreSubmitState& state, VkQueue queue, const VkSubmitInfo2KHR* submit,
const Location& loc) const;
bool ValidateMaxTimelineSemaphoreValueDifference(const Location& loc, VkSemaphore semaphore, uint64_t value) const;
bool ValidateStatus(const CMD_BUFFER_STATE* pNode, CBStatusFlags status_mask, const char* fail_msg, const char* msg_code) const;
bool ValidateDrawStateFlags(const CMD_BUFFER_STATE* pCB, const PIPELINE_STATE* pPipe, bool indexed, const char* msg_code) const;
bool LogInvalidAttachmentMessage(const char* type1_string, const RENDER_PASS_STATE* rp1_state, const char* type2_string,
const RENDER_PASS_STATE* rp2_state, uint32_t primary_attach, uint32_t secondary_attach,
const char* msg, const char* caller, const char* error_code) const;
bool LogInvalidPnextMessage(const char* type1_string, const RENDER_PASS_STATE* rp1_state, const char* type2_string,
const RENDER_PASS_STATE* rp2_state, const char* msg, const char* caller,
const char* error_code) const;
bool ValidateStageMaskHost(const Location& loc, VkPipelineStageFlags2KHR stageMask) const;
bool ValidateMapMemRange(const DEVICE_MEMORY_STATE* mem_info, VkDeviceSize offset, VkDeviceSize size) const;
bool ValidateRenderPassDAG(RenderPassCreateVersion rp_version, const VkRenderPassCreateInfo2* pCreateInfo) const;
bool ValidateAttachmentCompatibility(const char* type1_string, const RENDER_PASS_STATE* rp1_state, const char* type2_string,
const RENDER_PASS_STATE* rp2_state, uint32_t primary_attach, uint32_t secondary_attach,
const char* caller, const char* error_code) const;
bool ValidateSubpassCompatibility(const char* type1_string, const RENDER_PASS_STATE* rp1_state, const char* type2_string,
const RENDER_PASS_STATE* rp2_state, const int subpass, const char* caller,
const char* error_code) const;
bool ValidateRenderPassCompatibility(const char* type1_string, const RENDER_PASS_STATE* rp1_state, const char* type2_string,
const RENDER_PASS_STATE* rp2_state, const char* caller, const char* error_code) const;
bool ReportInvalidCommandBuffer(const CMD_BUFFER_STATE* cb_state, const char* call_source) const;
bool ValidateQueueFamilyIndex(const PHYSICAL_DEVICE_STATE* pd_state, uint32_t requested_queue_family, const char* err_code,
const char* cmd_name, const char* queue_family_var_name) const;
bool ValidateDeviceQueueCreateInfos(const PHYSICAL_DEVICE_STATE* pd_state, uint32_t info_count,
const VkDeviceQueueCreateInfo* infos) const;
bool ValidateProtectedImage(const CMD_BUFFER_STATE* cb_state, const IMAGE_STATE* image_state, const char* cmd_name,
const char* vuid, const char* more_message = "") const;
bool ValidateUnprotectedImage(const CMD_BUFFER_STATE* cb_state, const IMAGE_STATE* image_state, const char* cmd_name,
const char* vuid, const char* more_message = "") const;
bool ValidateProtectedBuffer(const CMD_BUFFER_STATE* cb_state, const BUFFER_STATE* buffer_state, const char* cmd_name,
const char* vuid, const char* more_message = "") const;
bool ValidateUnprotectedBuffer(const CMD_BUFFER_STATE* cb_state, const BUFFER_STATE* buffer_state, const char* cmd_name,
const char* vuid, const char* more_message = "") const;
bool ValidatePipelineVertexDivisors(std::vector<std::shared_ptr<PIPELINE_STATE>> const& pipe_state_vec, const uint32_t count,
const VkGraphicsPipelineCreateInfo* pipe_cis) const;
bool ValidatePipelineCacheControlFlags(VkPipelineCreateFlags flags, uint32_t index, const char* caller_name,
const char* vuid) const;
template <typename ImgBarrier>
void EnqueueSubmitTimeValidateImageBarrierAttachment(const Location& loc, CMD_BUFFER_STATE* cb_state,
const ImgBarrier& barrier);
template <typename ImgBarrier>
bool ValidateImageBarrierAttachment(const Location& loc, CMD_BUFFER_STATE const* cb_state, const FRAMEBUFFER_STATE* framebuffer,
uint32_t active_subpass, const safe_VkSubpassDescription2& sub_desc,
const VkRenderPass rp_handle, const ImgBarrier& img_barrier,
const CMD_BUFFER_STATE* primary_cb_state = nullptr) const;
static bool ValidateConcurrentBarrierAtSubmit(const Location& loc, const ValidationStateTracker* state_data,
const QUEUE_STATE* queue_data, const CMD_BUFFER_STATE* cb_state,
const VulkanTypedHandle& typed_handle, uint32_t src_queue_family,
uint32_t dst_queue_family);
bool ValidateCmdBeginRenderPass(VkCommandBuffer commandBuffer, RenderPassCreateVersion rp_version,
const VkRenderPassBeginInfo* pRenderPassBegin, CMD_TYPE cmd_type) const;
bool ValidateDependencies(FRAMEBUFFER_STATE const* framebuffer, RENDER_PASS_STATE const* renderPass) const;
template <typename Barrier>
bool ValidateBufferBarrier(const LogObjectList& objects, const Location& loc, const CMD_BUFFER_STATE* cb_state,
const Barrier& barrier) const;
template <typename Barrier>
bool ValidateImageBarrier(const LogObjectList& objects, const Location& loc, const CMD_BUFFER_STATE* cb_state,
const Barrier& barrier) const;
bool ValidateBarriers(const Location& loc, const CMD_BUFFER_STATE* cb_state, VkPipelineStageFlags src_stage_mask,
VkPipelineStageFlags dst_stage_mask, uint32_t memBarrierCount, const VkMemoryBarrier* pMemBarriers,
uint32_t bufferBarrierCount, const VkBufferMemoryBarrier* pBufferMemBarriers,
uint32_t imageMemBarrierCount, const VkImageMemoryBarrier* pImageMemBarriers) const;
bool ValidatePipelineStageFeatureEnables(const LogObjectList& objects, const Location& loc,
VkPipelineStageFlags2KHR stage_mask) const;
bool ValidatePipelineStage(const LogObjectList& objects, const Location& loc, VkQueueFlags queue_flags,
VkPipelineStageFlags2KHR stage_mask) const;
bool ValidateAccessMask(const LogObjectList& objects, const Location& loc, VkQueueFlags queue_flags,
VkAccessFlags2KHR access_mask, VkPipelineStageFlags2KHR stage_mask) const;
template <typename Barrier>
bool ValidateMemoryBarrier(const LogObjectList& objects, const Location& loc, const CMD_BUFFER_STATE* cb_state,
const Barrier& barrier, VkPipelineStageFlags src_stage_mask,
VkPipelineStageFlags dst_stage_mask) const;
template <typename Barrier>
bool ValidateMemoryBarrier(const LogObjectList& objects, const Location& loc, const CMD_BUFFER_STATE* cb_state,
const Barrier& barrier) const;
bool ValidateSubpassDependency(const LogObjectList& objects, const Location& loc, const VkSubpassDependency2& barrier) const;
bool ValidateDependencyInfo(const LogObjectList& objects, const Location& loc, const CMD_BUFFER_STATE* cb_state,
const VkDependencyInfoKHR* dep_info) const;
template <typename ImgBarrier>
bool ValidateBarrierQueueFamilies(const Location& loc, const CMD_BUFFER_STATE* cb_state, const ImgBarrier& barrier,
const IMAGE_STATE* state_data) const;
template <typename BufBarrier>
bool ValidateBarrierQueueFamilies(const Location& loc, const CMD_BUFFER_STATE* cb_state, const BufBarrier& barrier,
const BUFFER_STATE* state_data) const;
bool ValidateCreateSwapchain(const char* func_name, VkSwapchainCreateInfoKHR const* pCreateInfo,
const SURFACE_STATE* surface_state, const SWAPCHAIN_NODE* old_swapchain_state) const;
bool ValidateGraphicsPipelineBindPoint(const CMD_BUFFER_STATE* cb_state, const PIPELINE_STATE* pipeline_state) const;
bool ValidatePipelineBindPoint(const CMD_BUFFER_STATE* cb_state, VkPipelineBindPoint bind_point, const char* func_name,
const std::map<VkPipelineBindPoint, std::string>& bind_errors) const;
bool ValidateMemoryIsMapped(const char* funcName, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) const;
bool ValidateMappedMemoryRangeDeviceLimits(const char* func_name, uint32_t mem_range_count,
const VkMappedMemoryRange* mem_ranges) const;
bool ValidateSecondaryCommandBufferState(const CMD_BUFFER_STATE* pCB, const CMD_BUFFER_STATE* pSubCB) const;
bool ValidateFramebuffer(VkCommandBuffer primaryBuffer, const CMD_BUFFER_STATE* pCB, VkCommandBuffer secondaryBuffer,
const CMD_BUFFER_STATE* pSubCB, const char* caller) const;
bool ValidateDescriptorUpdateTemplate(const char* func_name, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo) const;
bool ValidateCreateSamplerYcbcrConversion(const char* func_name, const VkSamplerYcbcrConversionCreateInfo* create_info) const;
bool ValidateImportFence(VkFence fence, const char* vuid, const char* caller_name) const;
bool ValidateAcquireNextImage(VkDevice device, CommandVersion cmd_version, VkSwapchainKHR swapchain, uint64_t timeout,
VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex, const char* func_name,
const char* semaphore_type_vuid) const;
bool VerifyRenderAreaBounds(const VkRenderPassBeginInfo* pRenderPassBegin, const char* func_name) const;
bool VerifyFramebufferAndRenderPassImageViews(const VkRenderPassBeginInfo* pRenderPassBeginInfo, const char* func_name) const;
bool ValidatePrimaryCommandBuffer(const CMD_BUFFER_STATE* pCB, char const* cmd_name, const char* error_code) const;
void AddInitialLayoutintoImageLayoutMap(const IMAGE_STATE &image_state, GlobalImageLayoutMap &image_layout_map);
void RecordCmdNextSubpassLayouts(VkCommandBuffer commandBuffer, VkSubpassContents contents);
bool ValidateCmdEndRenderPass(RenderPassCreateVersion rp_version, VkCommandBuffer commandBuffer, CMD_TYPE cmd_type) const;
void RecordCmdEndRenderPassLayouts(VkCommandBuffer commandBuffer);
bool ValidateFramebufferCreateInfo(const VkFramebufferCreateInfo* pCreateInfo) const;
bool MatchUsage(uint32_t count, const VkAttachmentReference2* attachments, const VkFramebufferCreateInfo* fbci,
VkImageUsageFlagBits usage_flag, const char* error_code) const;
bool IsImageLayoutReadOnly(VkImageLayout layout) const;
bool IsDynamic(const PIPELINE_STATE* pPipeline, const VkDynamicState state) const;
bool CheckDependencyExists(const VkRenderPass renderpass, const uint32_t subpass, const VkImageLayout layout,
const std::vector<SubpassLayout>& dependent_subpasses, const std::vector<DAGNode>& subpass_to_node,
bool& skip) const;
bool CheckPreserved(const VkRenderPass renderpass, const VkRenderPassCreateInfo2* pCreateInfo, const int index,
const uint32_t attachment, const std::vector<DAGNode>& subpass_to_node, int depth, bool& skip) const;
bool ValidateBindImageMemory(uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const char* api_name) const;
bool ValidateGetPhysicalDeviceDisplayPlanePropertiesKHRQuery(VkPhysicalDevice physicalDevice, uint32_t planeIndex,
const char* api_name) const;
static bool ValidateCopyQueryPoolResults(const ValidationStateTracker* state_data, VkCommandBuffer commandBuffer,
VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, uint32_t perfPass,
VkQueryResultFlags flags, QueryMap* localQueryToStateMap);
static bool VerifyQueryIsReset(const ValidationStateTracker* state_data, VkCommandBuffer commandBuffer, QueryObject query_obj,
const char* func_name, VkQueryPool& firstPerfQueryPool, uint32_t perfPass,
QueryMap* localQueryToStateMap);
static bool ValidatePerformanceQuery(const ValidationStateTracker* state_data, VkCommandBuffer commandBuffer,
QueryObject query_obj, const char* func_name, VkQueryPool& firstPerfQueryPool,
uint32_t perfPass, QueryMap* localQueryToStateMap);
bool ValidateImportSemaphore(VkSemaphore semaphore, const char* caller_name) const;
bool ValidateBeginQuery(const CMD_BUFFER_STATE* cb_state, const QueryObject& query_obj, VkFlags flags, uint32_t index,
CMD_TYPE cmd, const ValidateBeginQueryVuids* vuids) const;
bool ValidateCmdEndQuery(const CMD_BUFFER_STATE* cb_state, const QueryObject& query_obj, uint32_t index, CMD_TYPE cmd,
const ValidateEndQueryVuids* vuids) const;
bool ValidateCmdResetQuery(const CMD_BUFFER_STATE* cb_state, VkQueryPool queryPool, uint32_t firstQuery,
uint32_t queryCount) const;
const DrawDispatchVuid& GetDrawDispatchVuid(CMD_TYPE cmd_type) const;
bool ValidateCmdDrawInstance(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance,
CMD_TYPE cmd_type) const;
bool ValidateCmdDrawType(VkCommandBuffer cmd_buffer, bool indexed, VkPipelineBindPoint bind_point, CMD_TYPE cmd_type) const;
bool ValidateCmdNextSubpass(RenderPassCreateVersion rp_version, VkCommandBuffer commandBuffer, CMD_TYPE cmd_type) const;
bool ValidateInsertMemoryRange(const VulkanTypedHandle& typed_handle, const DEVICE_MEMORY_STATE* mem_info,
VkDeviceSize memoryOffset, const char* api_name) const;
bool ValidateInsertImageMemoryRange(VkImage image, const DEVICE_MEMORY_STATE* mem_info, VkDeviceSize mem_offset,
const char* api_name) const;
bool ValidateInsertBufferMemoryRange(VkBuffer buffer, const DEVICE_MEMORY_STATE* mem_info, VkDeviceSize mem_offset,
const char* api_name) const;
bool ValidateInsertAccelerationStructureMemoryRange(VkAccelerationStructureNV as, const DEVICE_MEMORY_STATE* mem_info,
VkDeviceSize mem_offset, const char* api_name) const;
bool ValidateMemoryTypes(const DEVICE_MEMORY_STATE* mem_info, const uint32_t memory_type_bits, const char* funcName,
const char* msgCode) const;
bool ValidateCommandBufferState(const CMD_BUFFER_STATE* cb_state, const char* call_source, int current_submit_count,
const char* vu_id) const;
bool ValidateCommandBufferSimultaneousUse(const Location& loc, const CMD_BUFFER_STATE* pCB, int current_submit_count) const;
bool ValidateAttachmentReference(RenderPassCreateVersion rp_version, VkAttachmentReference2 reference,
const VkFormat attachment_format, bool input, const char* error_type,
const char* function_name) const;
bool ValidateRenderpassAttachmentUsage(RenderPassCreateVersion rp_version, const VkRenderPassCreateInfo2* pCreateInfo,
const char* function_name) const;
bool AddAttachmentUse(RenderPassCreateVersion rp_version, uint32_t subpass, std::vector<uint8_t>& attachment_uses,
std::vector<VkImageLayout>& attachment_layouts, uint32_t attachment, uint8_t new_use,
VkImageLayout new_layout) const;
bool ValidateAttachmentIndex(RenderPassCreateVersion rp_version, uint32_t attachment, uint32_t attachment_count,
const char* error_type, const char* function_name) const;
bool ValidateCreateRenderPass(VkDevice device, RenderPassCreateVersion rp_version, const VkRenderPassCreateInfo2* pCreateInfo,
const char* function_name) const;
bool ValidateRenderPassPipelineBarriers(const Location& loc, const CMD_BUFFER_STATE* cb_state,
VkPipelineStageFlags src_stage_mask, VkPipelineStageFlags dst_stage_mask,
VkDependencyFlags dependency_flags, uint32_t mem_barrier_count,
const VkMemoryBarrier* mem_barriers, uint32_t buffer_mem_barrier_count,
const VkBufferMemoryBarrier* buffer_mem_barriers, uint32_t image_mem_barrier_count,
const VkImageMemoryBarrier* image_barriers) const;
bool ValidateRenderPassPipelineBarriers(const Location& loc, const CMD_BUFFER_STATE* cb_state,
const VkDependencyInfoKHR* dep_info) const;
bool ValidateStageMasksAgainstQueueCapabilities(const LogObjectList& objects, const Location& loc, VkQueueFlags queue_flags,
VkPipelineStageFlags2KHR stage_mask) const;
bool ValidateUpdateDescriptorSetWithTemplate(VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate,
const void* pData) const;
bool ValidateMemoryIsBoundToBuffer(const BUFFER_STATE*, const char*, const char*) const;
bool ValidateMemoryIsBoundToImage(const IMAGE_STATE*, const char*, const char*) const;
bool ValidateMemoryIsBoundToImage(const IMAGE_STATE*, const Location&) const;
template <typename Location>
bool ValidateMemoryIsBoundToImage(const IMAGE_STATE*, const Location&) const;
bool ValidateMemoryIsBoundToAccelerationStructure(const ACCELERATION_STRUCTURE_STATE*, const char*, const char*) const;
bool ValidateMemoryIsBoundToAccelerationStructure(const ACCELERATION_STRUCTURE_STATE_KHR*, const char*, const char*) const;
bool ValidateObjectNotInUse(const BASE_NODE* obj_node, const char* caller_name, const char* error_code) const;
bool ValidateCmdQueueFlags(const CMD_BUFFER_STATE* cb_node, const char* caller_name, VkQueueFlags flags,
const char* error_code) const;
bool ValidateSampleLocationsInfo(const VkSampleLocationsInfoEXT* pSampleLocationsInfo, const char* apiName) const;
bool MatchSampleLocationsInfo(const VkSampleLocationsInfoEXT* pSampleLocationsInfo1,
const VkSampleLocationsInfoEXT* pSampleLocationsInfo2) const;
bool InsideRenderPass(const CMD_BUFFER_STATE* pCB, const char* apiName, const char* msgCode) const;
bool OutsideRenderPass(const CMD_BUFFER_STATE* pCB, const char* apiName, const char* msgCode) const;
bool ValidateImageSampleCount(const IMAGE_STATE* image_state, VkSampleCountFlagBits sample_count, const char* location,
const std::string& msgCode) const;
bool ValidateCmdSubpassState(const CMD_BUFFER_STATE* pCB, const CMD_TYPE cmd_type) const;
bool ValidateCmd(const CMD_BUFFER_STATE* cb_state, const CMD_TYPE cmd) const;
bool ValidateIndirectCmd(VkCommandBuffer command_buffer, VkBuffer buffer, CMD_TYPE cmd_type) const;
template <typename T1>
bool ValidateDeviceMaskToPhysicalDeviceCount(uint32_t deviceMask, const T1 object, const char* VUID) const;
template <typename T1>
bool ValidateDeviceMaskToZero(uint32_t deviceMask, const T1 object, const char* VUID) const;
template <typename T1>
bool ValidateDeviceMaskToCommandBuffer(const CMD_BUFFER_STATE* pCB, uint32_t deviceMask, const T1 object,
const char* VUID) const;
bool ValidateDeviceMaskToRenderPass(const CMD_BUFFER_STATE* pCB, uint32_t deviceMask, const char* VUID) const;
bool ValidateDepthStencilResolve(const VkPhysicalDeviceVulkan12Properties& core12_props,
const VkRenderPassCreateInfo2* pCreateInfo, const char* function_name) const;
bool ValidateBindAccelerationStructureMemory(VkDevice device, const VkBindAccelerationStructureMemoryInfoNV& info) const;
// Prototypes for CoreChecks accessor functions
VkFormatProperties GetPDFormatProperties(const VkFormat format) const;
const VkPhysicalDeviceMemoryProperties* GetPhysicalDeviceMemoryProperties();
bool FormatRequiresYcbcrConversionExplicitly(const VkFormat format) const;
template <typename TransferBarrier>
bool ValidateQueuedQFOTransferBarriers(const CMD_BUFFER_STATE* cb_state, QFOTransferCBScoreboards<TransferBarrier>* scoreboards,
const GlobalQFOTransferBarrierMap<TransferBarrier>& global_release_barriers) const;
bool ValidateQueuedQFOTransfers(const CMD_BUFFER_STATE* cb_state,
QFOTransferCBScoreboards<QFOImageTransferBarrier>* qfo_image_scoreboards,
QFOTransferCBScoreboards<QFOBufferTransferBarrier>* qfo_buffer_scoreboards) const;
template <typename Barrier, typename Scoreboard>
bool ValidateAndUpdateQFOScoreboard(const debug_report_data* report_data, const CMD_BUFFER_STATE* cb_state,
const char* operation, const Barrier& barrier, Scoreboard* scoreboard) const;
template <typename Barrier, typename TransferBarrier>
void RecordBarrierValidationInfo(const Location& loc, CMD_BUFFER_STATE* cb_state, const Barrier& barrier,
QFOTransferBarrierSets<TransferBarrier>& barrier_sets);
template <typename Barrier, typename TransferBarrier>
bool ValidateQFOTransferBarrierUniqueness(const Location& loc, const CMD_BUFFER_STATE* cb_state, const Barrier& barrier,
const QFOTransferBarrierSets<TransferBarrier>& barrier_sets) const;
bool ValidatePrimaryCommandBufferState(const Location& loc, const CMD_BUFFER_STATE* pCB, int current_submit_count,
QFOTransferCBScoreboards<QFOImageTransferBarrier>* qfo_image_scoreboards,
QFOTransferCBScoreboards<QFOBufferTransferBarrier>* qfo_buffer_scoreboards) const;
bool ValidatePipelineDrawtimeState(const LAST_BOUND_STATE& state, const CMD_BUFFER_STATE* pCB, CMD_TYPE cmd_type,
const PIPELINE_STATE* pPipeline) const;
bool ValidateCmdBufDrawState(const CMD_BUFFER_STATE* cb_node, CMD_TYPE cmd_type, const bool indexed,
const VkPipelineBindPoint bind_point) const;
bool ValidateCmdRayQueryState(const CMD_BUFFER_STATE* cb_state, CMD_TYPE cmd_type, const VkPipelineBindPoint bind_point) const;
static bool ValidateEventStageMask(const ValidationStateTracker* state_data, const CMD_BUFFER_STATE* pCB, size_t eventCount,
size_t firstEventIndex, VkPipelineStageFlags2KHR sourceStageMask,
EventToStageMap* localEventToStageMap);
bool ValidateQueueFamilyIndices(const Location& loc, const CMD_BUFFER_STATE* pCB, VkQueue queue) const;
bool ValidatePerformanceQueries(const CMD_BUFFER_STATE* pCB, VkQueue queue, VkQueryPool& first_query_pool,
uint32_t counterPassIndex) const;
VkResult CoreLayerCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkValidationCacheEXT* pValidationCache) override;
void CoreLayerDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache,
const VkAllocationCallbacks* pAllocator) override;
VkResult CoreLayerMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount,
const VkValidationCacheEXT* pSrcCaches) override;
VkResult CoreLayerGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize,
void* pData) override;
// For given bindings validate state at time of draw is correct, returning false on error and writing error details into string*
bool ValidateDrawState(const cvdescriptorset::DescriptorSet* descriptor_set, const BindingReqMap& bindings,
const std::vector<uint32_t>& dynamic_offsets, const CMD_BUFFER_STATE* cb_node,
const std::vector<IMAGE_VIEW_STATE*>* attachments, const std::vector<SUBPASS_INFO>* subpasses,
const char* caller, const DrawDispatchVuid& vuids) const;
bool ValidateDescriptorSetBindingData(const CMD_BUFFER_STATE* cb_node, const cvdescriptorset::DescriptorSet* descriptor_set,
const std::vector<uint32_t>& dynamic_offsets,
const std::pair<const uint32_t, DescriptorRequirement>& binding_info,
VkFramebuffer framebuffer, const std::vector<IMAGE_VIEW_STATE*>* attachments,
const std::vector<SUBPASS_INFO>* subpasses, bool record_time_validate, const char* caller,
const DrawDispatchVuid& vuids,
layer_data::optional<layer_data::unordered_map<VkImageView, VkImageLayout>>& checked_layouts) const;
bool ValidateGeneralBufferDescriptor(const char* caller, const DrawDispatchVuid& vuids, const CMD_BUFFER_STATE* cb_node,
const cvdescriptorset::DescriptorSet* descriptor_set,
const cvdescriptorset::BufferDescriptor& descriptor,
const std::pair<const uint32_t, DescriptorRequirement>& binding_info,
uint32_t index) const;
bool ValidateImageDescriptor(const char* caller, const DrawDispatchVuid& vuids, const CMD_BUFFER_STATE* cb_node,
const cvdescriptorset::DescriptorSet* descriptor_set,
const cvdescriptorset::ImageDescriptor& image_descriptor,
const std::pair<const uint32_t, DescriptorRequirement>& binding_info, uint32_t index,
bool record_time_validate, const std::vector<IMAGE_VIEW_STATE*>* attachments,
const std::vector<SUBPASS_INFO>* subpasses, VkFramebuffer framebuffer,
VkDescriptorType descriptor_type,
layer_data::optional<layer_data::unordered_map<VkImageView, VkImageLayout>>& checked_layouts) const;
bool ValidateTexelDescriptor(const char* caller, const DrawDispatchVuid& vuids, const CMD_BUFFER_STATE* cb_node,
const cvdescriptorset::DescriptorSet* descriptor_set,
const cvdescriptorset::TexelDescriptor& texel_descriptor,
const std::pair<const uint32_t, DescriptorRequirement>& binding_info, uint32_t index) const;
bool ValidateAccelerationDescriptor(const char* caller, const DrawDispatchVuid& vuids, const CMD_BUFFER_STATE* cb_node,
const cvdescriptorset::DescriptorSet* descriptor_set,
const cvdescriptorset::AccelerationStructureDescriptor& descriptor,
const std::pair<const uint32_t, DescriptorRequirement>& binding_info, uint32_t index) const;
bool ValidateSamplerDescriptor(const char* caller, const DrawDispatchVuid& vuids, const CMD_BUFFER_STATE* cb_node,
const cvdescriptorset::DescriptorSet* descriptor_set,
const std::pair<const uint32_t, DescriptorRequirement>& binding_info, uint32_t index,
VkSampler sampler, bool is_immutable, const SAMPLER_STATE* sampler_state) const;
// Validate contents of a CopyUpdate
using DescriptorSet = cvdescriptorset::DescriptorSet;
bool ValidateCopyUpdate(const VkCopyDescriptorSet* update, const DescriptorSet* dst_set, const DescriptorSet* src_set,
const char* func_name, std::string* error_code, std::string* error_msg) const;
bool VerifyCopyUpdateContents(const VkCopyDescriptorSet* update, const DescriptorSet* src_set, VkDescriptorType src_type,
uint32_t src_index, const DescriptorSet* dst_set, VkDescriptorType dst_type, uint32_t dst_index,
const char* func_name, std::string* error_code, std::string* error_msg) const;
// Validate contents of a WriteUpdate
bool ValidateWriteUpdate(const DescriptorSet* descriptor_set, const VkWriteDescriptorSet* update, const char* func_name,
std::string* error_code, std::string* error_msg, bool push) const;
bool VerifyWriteUpdateContents(const DescriptorSet* dest_set, const VkWriteDescriptorSet* update, const uint32_t index,
const char* func_name, std::string* error_code, std::string* error_msg, bool push) const;
// Shared helper functions - These are useful because the shared sampler image descriptor type
// performs common functions with both sampler and image descriptors so they can share their common functions
bool ValidateImageUpdate(VkImageView, VkImageLayout, VkDescriptorType, const char* func_name, std::string*, std::string*) const;
// Validate contents of a push descriptor update
bool ValidatePushDescriptorsUpdate(const DescriptorSet* push_set, uint32_t write_count, const VkWriteDescriptorSet* p_wds,
const char* func_name) const;
// Descriptor Set Validation Functions
bool ValidateSampler(VkSampler) const;
bool ValidateBufferUpdate(VkDescriptorBufferInfo const* buffer_info, VkDescriptorType type, const char* func_name,
std::string* error_code, std::string* error_msg) const;
template <typename T>
bool ValidateAccelerationStructureUpdate(T acc, const char* func_name, std::string* error_code, std::string* error_msg) const;
bool ValidateUpdateDescriptorSetsWithTemplateKHR(VkDescriptorSet descriptorSet, const TEMPLATE_STATE* template_state,
const void* pData) const;
bool ValidateAllocateDescriptorSets(const VkDescriptorSetAllocateInfo*,
const cvdescriptorset::AllocateDescriptorSetsData*) const;
bool ValidateUpdateDescriptorSets(uint32_t write_count, const VkWriteDescriptorSet* p_wds, uint32_t copy_count,
const VkCopyDescriptorSet* p_cds, const char* func_name) const;
// Stuff from shader_validation
bool ValidateGraphicsPipelineShaderState(const PIPELINE_STATE* pPipeline) const;
bool ValidateGraphicsPipelineShaderDynamicState(const PIPELINE_STATE* pPipeline, const CMD_BUFFER_STATE* pCB,
const char* caller, const DrawDispatchVuid& vuid) const;
bool ValidateGraphicsPipelineBlendEnable(const PIPELINE_STATE* pPipeline) const;
void RecordGraphicsPipelineShaderDynamicState(PIPELINE_STATE *pipeline);
bool ValidateComputePipelineShaderState(PIPELINE_STATE* pPipeline) const;
uint32_t CalcShaderStageCount(const PIPELINE_STATE* pipeline, VkShaderStageFlagBits stageBit) const;
bool GroupHasValidIndex(const PIPELINE_STATE* pipeline, uint32_t group, uint32_t stage) const;
bool ValidateRayTracingPipeline(PIPELINE_STATE* pipeline, VkPipelineCreateFlags flags, bool isKHR) const;
bool PreCallValidateCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) const override;
bool ValidatePipelineShaderStage(const PIPELINE_STATE* pipeline, const PipelineStageState& stage_state,
bool check_point_size) const;
bool ValidatePointListShaderState(const PIPELINE_STATE* pipeline, SHADER_MODULE_STATE const* src, spirv_inst_iter entrypoint,
VkShaderStageFlagBits stage) const;
bool ValidatePrimitiveRateShaderState(const PIPELINE_STATE* pipeline, SHADER_MODULE_STATE const* src,
spirv_inst_iter entrypoint, VkShaderStageFlagBits stage) const;
bool ValidateTexelGatherOffset(SHADER_MODULE_STATE const* src, spirv_inst_iter& insn) const;
bool ValidateShaderCapabilitiesAndExtensions(SHADER_MODULE_STATE const* src, spirv_inst_iter& insn) const;
bool ValidateShaderStageWritableOrAtomicDescriptor(VkShaderStageFlagBits stage, bool has_writable_descriptor,
bool has_atomic_descriptor) const;
bool ValidateShaderStageInputOutputLimits(SHADER_MODULE_STATE const* src, VkPipelineShaderStageCreateInfo const* pStage,
const PIPELINE_STATE* pipeline, spirv_inst_iter entrypoint) const;
bool ValidateShaderStorageImageFormats(SHADER_MODULE_STATE const* src) const;
bool ValidateShaderStageMaxResources(VkShaderStageFlagBits stage, const PIPELINE_STATE* pipeline) const;
bool ValidateShaderStageGroupNonUniform(SHADER_MODULE_STATE const* src, VkShaderStageFlagBits stage,
spirv_inst_iter& insn) const;
bool ValidateWorkgroupSize(SHADER_MODULE_STATE const* src, VkPipelineShaderStageCreateInfo const* pStage,
const std::unordered_map<uint32_t, std::vector<uint32_t>>& id_value_map) const;
bool ValidateCooperativeMatrix(SHADER_MODULE_STATE const* src, VkPipelineShaderStageCreateInfo const* pStage,
const PIPELINE_STATE* pipeline) const;
bool ValidateShaderResolveQCOM(SHADER_MODULE_STATE const* src, VkPipelineShaderStageCreateInfo const* pStage,
const PIPELINE_STATE* pipeline) const;
bool ValidateShaderSubgroupSizeControl(VkPipelineShaderStageCreateInfo const* pStage) const;
bool ValidateAtomicsTypes(SHADER_MODULE_STATE const* src) const;
bool ValidateExecutionModes(SHADER_MODULE_STATE const* src, spirv_inst_iter entrypoint) const;
bool ValidateViConsistency(VkPipelineVertexInputStateCreateInfo const* vi) const;
bool ValidateViAgainstVsInputs(VkPipelineVertexInputStateCreateInfo const* vi, SHADER_MODULE_STATE const* vs,
spirv_inst_iter entrypoint) const;
bool ValidateFsOutputsAgainstRenderPass(SHADER_MODULE_STATE const* fs, spirv_inst_iter entrypoint,
PIPELINE_STATE const* pipeline, uint32_t subpass_index) const;
bool ValidatePushConstantUsage(const PIPELINE_STATE& pipeline, SHADER_MODULE_STATE const* src,
VkPipelineShaderStageCreateInfo const* pStage, const std::string& vuid) const;
bool ValidateBuiltinLimits(SHADER_MODULE_STATE const* src, spirv_inst_iter entrypoint) const;
PushConstantByteState ValidatePushConstantSetUpdate(const std::vector<uint8_t>& push_constant_data_update,
const shader_struct_member& push_constant_used_in_shader,
uint32_t& out_issue_index) const;
bool ValidateSpecializations(VkPipelineShaderStageCreateInfo const* info) const;
bool RequirePropertyFlag(VkBool32 check, char const* flag, char const* structure, const char* vuid) const;
bool RequireFeature(VkBool32 feature, char const* feature_name, const char* vuid) const;
bool RequireApiVersion(uint32_t version, const char* vuid) const;
bool ValidateInterfaceBetweenStages(SHADER_MODULE_STATE const* producer, spirv_inst_iter producer_entrypoint,
shader_stage_attributes const* producer_stage, SHADER_MODULE_STATE const* consumer,
spirv_inst_iter consumer_entrypoint, shader_stage_attributes const* consumer_stage) const;
bool ValidateDecorations(SHADER_MODULE_STATE const* module) const;
bool ValidateTransformFeedback(SHADER_MODULE_STATE const* module, spirv_inst_iter& insn) const;
bool ValidateShaderClock(SHADER_MODULE_STATE const* module, spirv_inst_iter& insn) const;
template <typename RegionType>
bool ValidateCopyImageTransferGranularityRequirements(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* src_img,
const IMAGE_STATE* dst_img, const RegionType* region, const uint32_t i,
const char* function, CopyCommandVersion version) const;
bool ValidateIdleBuffer(VkBuffer buffer) const;
template <typename T1>
bool ValidateUsageFlags(VkFlags actual, VkFlags desired, VkBool32 strict, const T1 object,
const VulkanTypedHandle& typed_handle, const char* msgCode, char const* func_name,
char const* usage_str) const;
bool ValidateImageSubresourceRange(const uint32_t image_mip_count, const uint32_t image_layer_count,
const VkImageSubresourceRange& subresourceRange, const char* cmd_name,
const char* param_name, const char* image_layer_count_var_name, const VkImage image,
const SubresourceRangeErrorCodes& errorCodes) const;
bool ValidateRenderPassLayoutAgainstFramebufferImageUsage(RenderPassCreateVersion rp_version, VkImageLayout layout,
VkImage image, VkImageView image_view, VkFramebuffer framebuffer,
VkRenderPass renderpass, uint32_t attachment_index,
const char* variable_name) const;
template <typename RegionType>
bool ValidateBufferImageCopyData(const CMD_BUFFER_STATE* cb_node, uint32_t regionCount, const RegionType* pRegions,
const IMAGE_STATE* image_state, const char* function, CopyCommandVersion version,
bool image_to_buffer) const;
bool ValidateBufferViewRange(const BUFFER_STATE* buffer_state, const VkBufferViewCreateInfo* pCreateInfo,
const VkPhysicalDeviceLimits* device_limits) const;
bool ValidateBufferViewBuffer(const BUFFER_STATE* buffer_state, const VkBufferViewCreateInfo* pCreateInfo) const;
bool ValidateImageFormatFeatures(const VkImageCreateInfo* pCreateInfo) const;
bool PreCallValidateCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
VkImage* pImage) const override;
void PostCallRecordCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator,
VkImage* pImage, VkResult result) override;
void PreCallRecordDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) override;
bool PreCallValidateDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) const override;
bool ValidateImageAttributes(const IMAGE_STATE* image_state, const VkImageSubresourceRange& range,
const char* param_name) const;
bool ValidateClearAttachmentExtent(VkCommandBuffer command_buffer, uint32_t attachment_index,
const FRAMEBUFFER_STATE* framebuffer, uint32_t fb_attachment, const VkRect2D& render_area,
uint32_t rect_count, const VkClearRect* clear_rects,
const CMD_BUFFER_STATE* primary_cb_state = nullptr) const;
template <typename ImageCopyRegionType>
bool ValidateImageCopyData(const uint32_t regionCount, const ImageCopyRegionType* ic_regions, const IMAGE_STATE* src_state,
const IMAGE_STATE* dst_state, CopyCommandVersion version) const;
bool VerifyClearImageLayout(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* image_state,
const VkImageSubresourceRange& range, VkImageLayout dest_image_layout, const char* func_name) const;
bool VerifyImageLayout(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* image_state, const VkImageSubresourceRange& range,
VkImageAspectFlags view_aspect, VkImageLayout explicit_layout, VkImageLayout optimal_layout,
const char* caller, const char* layout_invalid_msg_code, const char* layout_mismatch_msg_code,
bool* error) const;
bool VerifyImageLayout(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* image_state, const VkImageSubresourceRange& range,
VkImageLayout explicit_layout, VkImageLayout optimal_layout, const char* caller,
const char* layout_invalid_msg_code, const char* layout_mismatch_msg_code, bool* error) const {
return VerifyImageLayout(cb_node, image_state, range, 0, explicit_layout, optimal_layout, caller, layout_invalid_msg_code,
layout_mismatch_msg_code, error);
}
bool VerifyImageLayout(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* image_state,
const VkImageSubresourceLayers& subLayers, VkImageLayout explicit_layout, VkImageLayout optimal_layout,
const char* caller, const char* layout_invalid_msg_code, const char* layout_mismatch_msg_code,
bool* error) const;
bool CheckItgExtent(const CMD_BUFFER_STATE* cb_node, const VkExtent3D* extent, const VkOffset3D* offset,
const VkExtent3D* granularity, const VkExtent3D* subresource_extent, const VkImageType image_type,
const uint32_t i, const char* function, const char* member, const char* vuid) const;
bool CheckItgOffset(const CMD_BUFFER_STATE* cb_node, const VkOffset3D* offset, const VkExtent3D* granularity, const uint32_t i,
const char* function, const char* member, const char* vuid) const;
VkExtent3D GetScaledItg(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* img) const;
bool PreCallValidateCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
const VkClearColorValue* pColor, uint32_t rangeCount,
const VkImageSubresourceRange* pRanges) const override;
void PreCallRecordCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
const VkClearColorValue* pColor, uint32_t rangeCount,
const VkImageSubresourceRange* pRanges) override;
bool ValidateClearDepthStencilValue(VkCommandBuffer commandBuffer, VkClearDepthStencilValue clearValue,
const char* apiName) const;
bool PreCallValidateCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount,
const VkImageSubresourceRange* pRanges) const override;
void PreCallRecordCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout,
const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount,
const VkImageSubresourceRange* pRanges) override;
bool FindLayouts(const IMAGE_STATE& image_state, std::vector<VkImageLayout>& layouts) const;
bool VerifyFramebufferAndRenderPassLayouts(RenderPassCreateVersion rp_version, const CMD_BUFFER_STATE* pCB,
const VkRenderPassBeginInfo* pRenderPassBegin,
const FRAMEBUFFER_STATE* framebuffer_state) const;
void RecordCmdBeginRenderPassLayouts(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin,
const VkSubpassContents contents);
void TransitionAttachmentRefLayout(CMD_BUFFER_STATE* pCB, FRAMEBUFFER_STATE* pFramebuffer,
const safe_VkAttachmentReference2& ref);
void TransitionSubpassLayouts(CMD_BUFFER_STATE*, const RENDER_PASS_STATE*, const int, FRAMEBUFFER_STATE*);
void TransitionBeginRenderPassLayouts(CMD_BUFFER_STATE*, const RENDER_PASS_STATE*, FRAMEBUFFER_STATE*);
bool ValidateBarrierLayoutToImageUsage(const Location& loc, VkImage image, VkImageLayout layout, VkImageUsageFlags usage) const;
template <typename ImageBarrier>
bool ValidateBarriersToImages(const Location& loc, const CMD_BUFFER_STATE* cb_state, uint32_t imageMemoryBarrierCount,
const ImageBarrier* pImageMemoryBarriers) const;
void RecordQueuedQFOTransfers(CMD_BUFFER_STATE* pCB);
template <typename ImgBarrier>
void TransitionImageLayouts(CMD_BUFFER_STATE* cb_state, uint32_t barrier_count, const ImgBarrier* barrier);
template <typename ImgBarrier>
void RecordTransitionImageLayout(CMD_BUFFER_STATE* cb_state, const IMAGE_STATE* image_state, const ImgBarrier& img_barrier,
bool is_release_op);
void RecordBarriers(Func func_name, CMD_BUFFER_STATE* cb_state, uint32_t bufferBarrierCount,
const VkBufferMemoryBarrier* pBufferMemBarriers, uint32_t imageMemBarrierCount,
const VkImageMemoryBarrier* pImageMemBarriers);
void RecordBarriers(Func func_name, CMD_BUFFER_STATE* cb_state, const VkDependencyInfoKHR& dep_info);
void TransitionFinalSubpassLayouts(CMD_BUFFER_STATE* pCB, const VkRenderPassBeginInfo* pRenderPassBegin,
FRAMEBUFFER_STATE* framebuffer_state);
template <typename RegionType>
bool ValidateCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const RegionType* pRegions,
CopyCommandVersion version) const;
bool PreCallValidateCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
const VkImageCopy* pRegions) const override;
bool PreCallValidateCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2KHR* pCopyImageInfo) const override;
bool PreCallValidateCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount,
const VkClearAttachment* pAttachments, uint32_t rectCount,
const VkClearRect* pRects) const override;
void PreCallRecordCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount,
const VkClearAttachment* pAttachments, uint32_t rectCount,
const VkClearRect* pRects) override;
template <typename RegionType>
bool ValidateCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const RegionType* pRegions,
CopyCommandVersion version) const;
bool PreCallValidateCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
const VkImageResolve* pRegions) const override;
bool PreCallValidateCmdResolveImage2KHR(VkCommandBuffer commandBuffer,
const VkResolveImageInfo2KHR* pResolveImageInfo) const override;
template <typename RegionType>
bool ValidateCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const RegionType* pRegions, VkFilter filter,
CopyCommandVersion version) const;
bool PreCallValidateCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount,
const VkImageBlit* pRegions, VkFilter filter) const override;
bool PreCallValidateCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2KHR* pBlitImageInfo) const override;
template <typename RegionType>
void RecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const RegionType* pRegions, VkFilter filter);
void PreCallRecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions,
VkFilter filter) override;
void PreCallRecordCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2KHR* pBlitImageInfo) override;
bool ValidateCmdBufImageLayouts(const Location& loc, const CMD_BUFFER_STATE* pCB,
const GlobalImageLayoutMap& globalImageLayoutMap, GlobalImageLayoutMap& overlayLayoutMap) const;
void UpdateCmdBufImageLayouts(CMD_BUFFER_STATE* pCB);
template <typename T1>
bool VerifyBoundMemoryIsValid(const DEVICE_MEMORY_STATE* mem_state, const T1 object, const VulkanTypedHandle& typed_handle,
const char* api_name, const char* error_code) const;
template <typename T1, typename LocType>
bool VerifyBoundMemoryIsValid(const DEVICE_MEMORY_STATE* mem_state, const T1 object, const VulkanTypedHandle& typed_handle,
const LocType& location) const;
bool ValidateLayoutVsAttachmentDescription(const debug_report_data* report_data, RenderPassCreateVersion rp_version,
const VkImageLayout first_layout, const uint32_t attachment,
const VkAttachmentDescription2& attachment_description) const;
bool ValidateImageUsageFlags(IMAGE_STATE const* image_state, VkFlags desired, bool strict, const char* msgCode,
char const* func_name, char const* usage_string) const;
bool ValidateImageFormatFeatureFlags(IMAGE_STATE const* image_state, VkFormatFeatureFlags desired, char const* func_name,
const char* vuid) const;
bool ValidateImageSubresourceLayers(const CMD_BUFFER_STATE* cb_node, const VkImageSubresourceLayers* subresource_layers,
char const* func_name, char const* member, uint32_t i) const;
bool ValidateBufferUsageFlags(BUFFER_STATE const* buffer_state, VkFlags desired, bool strict, const char* msgCode,
char const* func_name, char const* usage_string) const;
bool PreCallValidateCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) const override;
bool PreCallValidateCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkBufferView* pView) const override;
bool ValidateImageAspectMask(VkImage image, VkFormat format, VkImageAspectFlags aspect_mask, const char* func_name,
const char* vuid = kVUID_Core_DrawState_InvalidImageAspect) const;
bool ValidateImageAcquired(IMAGE_STATE const& image_state, const char* func_name) const;
bool ValidateCreateImageViewSubresourceRange(const IMAGE_STATE* image_state, bool is_imageview_2d_type,
const VkImageSubresourceRange& subresourceRange) const;
bool ValidateCmdClearColorSubresourceRange(const IMAGE_STATE* image_state, const VkImageSubresourceRange& subresourceRange,
const char* param_name) const;
bool ValidateCmdClearDepthSubresourceRange(const IMAGE_STATE* image_state, const VkImageSubresourceRange& subresourceRange,
const char* param_name) const;
bool ValidateImageBarrierSubresourceRange(const Location& loc, const IMAGE_STATE* image_state,
const VkImageSubresourceRange& subresourceRange) const;
bool ValidateImageViewFormatFeatures(const IMAGE_STATE* image_state, const VkFormat view_format,
const VkImageUsageFlags image_usage) const;
bool PreCallValidateCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkImageView* pView) const override;
template <typename BufferImageCopyRegionType>
bool ValidateCmdCopyBufferBounds(const BUFFER_STATE* src_buffer_state, const BUFFER_STATE* dst_buffer_state,
uint32_t regionCount, const BufferImageCopyRegionType* pRegions,
CopyCommandVersion version) const;
template <typename BufferImageCopyRegionType>
bool ValidateImageBounds(const IMAGE_STATE* image_state, const uint32_t regionCount, const BufferImageCopyRegionType* pRegions,
const char* func_name, const char* msg_code) const;
template <typename BufferImageCopyRegionType>
bool ValidateBufferBounds(const IMAGE_STATE* image_state, const BUFFER_STATE* buff_state, uint32_t regionCount,
const BufferImageCopyRegionType* pRegions, const char* func_name, const char* msg_code) const;
template <typename BufferImageCopyRegionType>
bool ValidateCopyBufferImageTransferGranularityRequirements(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* img,
const BufferImageCopyRegionType* region, const uint32_t i,
const char* function, const char* vuid) const;
bool ValidateImageMipLevel(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* img, uint32_t mip_level, const uint32_t i,
const char* function, const char* member, const char* vuid) const;
bool ValidateImageArrayLayerRange(const CMD_BUFFER_STATE* cb_node, const IMAGE_STATE* img, const uint32_t base_layer,
const uint32_t layer_count, const uint32_t i, const char* function, const char* member,
const char* vuid) const;
bool ValidateWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const char* apiName) const;
void PreCallRecordCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) override;
void PreCallRecordCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2KHR* pCopyImageInfo) override;
bool PreCallValidateCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount,
const VkBufferCopy* pRegions) const override;
bool PreCallValidateCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer,
const VkCopyBufferInfo2KHR* pCopyBufferInfos) const override;
bool PreCallValidateDestroyImageView(VkDevice device, VkImageView imageView,
const VkAllocationCallbacks* pAllocator) const override;
bool PreCallValidateDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) const override;
void PreCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) override;
bool PreCallValidateDestroyBufferView(VkDevice device, VkBufferView bufferView,
const VkAllocationCallbacks* pAllocator) const override;
bool PreCallValidateCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size,
uint32_t data) const override;
template <typename RegionType>
bool ValidateCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
VkBuffer dstBuffer, uint32_t regionCount, const RegionType* pRegions,
CopyCommandVersion version) const;
bool PreCallValidateCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
VkBuffer dstBuffer, uint32_t regionCount,
const VkBufferImageCopy* pRegions) const override;
void PreCallRecordCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout,
VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) override;
bool PreCallValidateCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer,
const VkCopyImageToBufferInfo2KHR* pCopyImageToBufferInfo) const override;
void PreCallRecordCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer,
const VkCopyImageToBufferInfo2KHR* pCopyImageToBufferInfo) override;
template <typename RegionType>
bool ValidateCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount, const RegionType* pRegions,
CopyCommandVersion version) const;
bool PreCallValidateCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount,
const VkBufferImageCopy* pRegions) const override;
void PreCallRecordCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount,
const VkBufferImageCopy* pRegions) override;
bool PreCallValidateCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer,
const VkCopyBufferToImageInfo2KHR* pCopyBufferToImageInfo) const override;
void PreCallRecordCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer,
const VkCopyBufferToImageInfo2KHR* pCopyBufferToImageInfo) override;
bool PreCallValidateGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource,
VkSubresourceLayout* pLayout) const override;
bool ValidateCreateImageANDROID(const debug_report_data* report_data, const VkImageCreateInfo* create_info) const;
bool ValidateCreateImageViewANDROID(const VkImageViewCreateInfo* create_info) const;
bool ValidateGetImageSubresourceLayoutANDROID(const VkImage image) const;
bool ValidatePhysicalDeviceQueueFamilies(uint32_t queue_family_count, const uint32_t* queue_families, const char* cmd_name,
const char* array_parameter_name, const char* vuid) const;
bool ValidateAllocateMemoryANDROID(const VkMemoryAllocateInfo* alloc_info) const;
bool ValidateGetImageMemoryRequirementsANDROID(const VkImage image, const char* func_name) const;
bool ValidateGetPhysicalDeviceImageFormatProperties2ANDROID(const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
const VkImageFormatProperties2* pImageFormatProperties) const;
bool ValidateBufferImportedHandleANDROID(const char* func_name, VkExternalMemoryHandleTypeFlags handleType,
VkDeviceMemory memory, VkBuffer buffer) const;
bool ValidateImageImportedHandleANDROID(const char* func_name, VkExternalMemoryHandleTypeFlags handleType,
VkDeviceMemory memory, VkImage image) const;
bool PreCallValidateCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkPipelineCache* pPipelineCache) const override;
bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
const VkGraphicsPipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines,
void* cgpl_state) const override;
bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
const VkComputePipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines,
void* pipe_state) const override;
void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
const VkGraphicsPipelineCreateInfo* pCreateInfos,
const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines,
VkResult result, void* cgpl_state_data) override;
bool PreCallValidateGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo,
uint32_t* pExecutableCount,
VkPipelineExecutablePropertiesKHR* pProperties) const override;
bool ValidatePipelineExecutableInfo(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo,
const char* caller_name, const char* feature_vuid) const;
bool PreCallValidateGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo,
uint32_t* pStatisticCount,
VkPipelineExecutableStatisticKHR* pStatistics) const override;
bool PreCallValidateGetPipelineExecutableInternalRepresentationsKHR(
VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount,
VkPipelineExecutableInternalRepresentationKHR* pStatistics) const override;
bool PreCallValidateCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkPipelineLayout* pPipelineLayout) const override;
bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo,
VkDescriptorSet* pDescriptorSets, void* ads_state) const override;
bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t count,
const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines,
void* pipe_state) const override;
bool PreCallValidateCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation,
VkPipelineCache pipelineCache, uint32_t count,
const VkRayTracingPipelineCreateInfoKHR* pCreateInfos,
const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines,
void* pipe_state) const override;
bool PreCallValidateCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer,
VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer,
VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride,
VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset,
VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer,
VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride,
uint32_t width, uint32_t height, uint32_t depth) const override;
bool PreCallValidateCmdTraceRaysKHR(VkCommandBuffer commandBuffer,
const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width,
uint32_t height, uint32_t depth) const override;
bool PreCallValidateCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer,
const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
VkDeviceAddress indirectDeviceAddress) const override;
bool PreCallValidateCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) const override;
void PostCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, VkResult result) override;
bool PreCallValidateCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset,
VkDeviceSize dataSize, const void* pData) const override;
bool PreCallValidateGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex,
VkQueue* pQueue) const override;
bool PreCallValidateGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) const override;
bool PreCallValidateCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSamplerYcbcrConversion* pYcbcrConversion) const override;
bool PreCallValidateCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSamplerYcbcrConversion* pYcbcrConversion) const override;
bool PreCallValidateCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) const override;
bool PreCallValidateCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer,
const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) const override;
void PreCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) override;
bool PreCallValidateQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits,
VkFence fence) const override;
void PostCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence,