MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / ValidateFirstUse

Method ValidateFirstUse

layers/sync/sync_op.cpp:1275–1297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1273}
1274
1275bool ReplayState::ValidateFirstUse() {
1276 bool skip = false;
1277 ResourceUsageRange first_use_range = {0, 0};
1278
1279 for (const auto& sync_op : recorded_context_.GetSyncOps()) {
1280 // Set the range to cover all accesses until the next sync_op, and validate
1281 first_use_range.end = sync_op.tag;
1282 skip |= DetectFirstUseHazard(first_use_range);
1283
1284 // Call to replay validate support for syncop with non-trivial replay
1285 skip |= sync_op.sync_op->ReplayValidate(*this, sync_op.tag);
1286
1287 // Record the barrier into the proxy context.
1288 sync_op.sync_op->ReplayRecord(exec_context_, base_tag_ + sync_op.tag);
1289 first_use_range.begin = sync_op.tag + 1;
1290 }
1291
1292 // and anything after the last syncop
1293 first_use_range.end = ResourceUsageRecord::kMaxIndex;
1294 skip |= DetectFirstUseHazard(first_use_range);
1295
1296 return skip;
1297}
1298AccessContext* ReplayState::RenderPassReplayState::Begin(VkQueueFlags queue_flags, const SyncOpBeginRenderPass& begin_op_,
1299 const AccessContext& external_context) {
1300 const RenderPassAccessContext* rp_context = begin_op_.GetRenderPassAccessContext();

Callers 2

ValidateSubmitMethod · 0.80

Calls 2

ReplayValidateMethod · 0.80
ReplayRecordMethod · 0.80

Tested by

no test coverage detected