Skip to content

Commit 6b13081

Browse files
layers: Collection of nit cleanups
1 parent e14ac8c commit 6b13081

6 files changed

Lines changed: 137 additions & 141 deletions

File tree

layers/core_checks/cc_device.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ bool CoreChecks::GetPhysicalDeviceImageFormatProperties(vvl::Image &image_state,
118118
return skip;
119119
}
120120

121-
bool CoreChecks::ValidateDeviceMaskToPhysicalDeviceCount(uint32_t deviceMask, const LogObjectList &objlist, const Location loc,
121+
bool CoreChecks::ValidateDeviceMaskToPhysicalDeviceCount(uint32_t deviceMask, const LogObjectList &objlist, const Location &loc,
122122
const char *vuid) const {
123123
bool skip = false;
124124
uint32_t count = 1 << device_state->physical_device_count;
@@ -129,7 +129,7 @@ bool CoreChecks::ValidateDeviceMaskToPhysicalDeviceCount(uint32_t deviceMask, co
129129
return skip;
130130
}
131131

132-
bool CoreChecks::ValidateDeviceMaskToZero(uint32_t deviceMask, const LogObjectList &objlist, const Location loc,
132+
bool CoreChecks::ValidateDeviceMaskToZero(uint32_t deviceMask, const LogObjectList &objlist, const Location &loc,
133133
const char *vuid) const {
134134
bool skip = false;
135135
if (deviceMask == 0) {
@@ -139,7 +139,7 @@ bool CoreChecks::ValidateDeviceMaskToZero(uint32_t deviceMask, const LogObjectLi
139139
}
140140

141141
bool CoreChecks::ValidateDeviceMaskToCommandBuffer(const vvl::CommandBuffer &cb_state, uint32_t deviceMask,
142-
const LogObjectList &objlist, const Location loc, const char *vuid) const {
142+
const LogObjectList &objlist, const Location &loc, const char *vuid) const {
143143
bool skip = false;
144144
if ((deviceMask & cb_state.initial_device_mask) != deviceMask) {
145145
skip |= LogError(vuid, objlist, loc, "(0x%" PRIx32 ") is not a subset of %s initial device mask (0x%" PRIx32 ").",
@@ -148,7 +148,7 @@ bool CoreChecks::ValidateDeviceMaskToCommandBuffer(const vvl::CommandBuffer &cb_
148148
return skip;
149149
}
150150

151-
bool CoreChecks::ValidateDeviceMaskToRenderPass(const vvl::CommandBuffer &cb_state, uint32_t deviceMask, const Location loc,
151+
bool CoreChecks::ValidateDeviceMaskToRenderPass(const vvl::CommandBuffer &cb_state, uint32_t deviceMask, const Location &loc,
152152
const char *vuid) const {
153153
bool skip = false;
154154
if (cb_state.active_render_pass && ((deviceMask & cb_state.render_pass_device_mask) != deviceMask)) {

layers/core_checks/cc_device_generated_commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ bool CoreChecks::ValidatePreprocessGeneratedCommandsStateCommandBuffer(const vvl
671671
const vvl::CommandBuffer& state_command_buffer,
672672
const vvl::IndirectCommandsLayout& indirect_commands_layout,
673673
const VkGeneratedCommandsInfoEXT& generated_commands_info,
674-
const Location loc) const {
674+
const Location& loc) const {
675675
bool skip = false;
676676

677677
if (state_command_buffer.state == CbState::InvalidComplete || state_command_buffer.state == CbState::InvalidIncomplete) {

layers/core_checks/cc_pipeline.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,9 @@ bool CoreChecks::ValidatePipelineBindPoint(const vvl::CommandBuffer &cb_state, V
463463
bool skip = false;
464464
const auto *pool = cb_state.command_pool;
465465
// The loss of a pool in a recording cmd is reported in DestroyCommandPool
466-
if (!pool) return skip;
466+
if (!pool) {
467+
return skip;
468+
}
467469

468470
const VkQueueFlags required_mask = (VK_PIPELINE_BIND_POINT_GRAPHICS == bind_point) ? VK_QUEUE_GRAPHICS_BIT
469471
: (VK_PIPELINE_BIND_POINT_COMPUTE == bind_point) ? VK_QUEUE_COMPUTE_BIT
@@ -473,7 +475,7 @@ bool CoreChecks::ValidatePipelineBindPoint(const vvl::CommandBuffer &cb_state, V
473475

474476
const auto &qfp = physical_device_state->queue_family_properties[pool->queueFamilyIndex];
475477
if (0 == (qfp.queueFlags & required_mask)) {
476-
const LogObjectList objlist(cb_state.Handle(), cb_state.allocate_info.commandPool);
478+
const LogObjectList objlist(cb_state.Handle(), pool->Handle());
477479
const char *vuid = kVUIDUndefined;
478480
switch (loc.function) {
479481
case Func::vkCmdBindDescriptorSets:
@@ -524,7 +526,7 @@ bool CoreChecks::ValidatePipelineBindPoint(const vvl::CommandBuffer &cb_state, V
524526
break;
525527
}
526528
skip |= LogError(vuid, objlist, loc, "%s was allocated from %s that does not support bindpoint %s.",
527-
FormatHandle(cb_state.Handle()).c_str(), FormatHandle(cb_state.allocate_info.commandPool).c_str(),
529+
FormatHandle(cb_state.Handle()).c_str(), FormatHandle(pool->Handle()).c_str(),
528530
string_VkPipelineBindPoint(bind_point));
529531
}
530532
return skip;

0 commit comments

Comments
 (0)