Skip to content

Commit 0e6ba0e

Browse files
Juan Ramosspencer-lunarg
authored andcommitted
layers: Fix -Werror=array-bounds error
VkPipelineBindPoint doesn't index nicely into an array. i.e. VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR = 1000165000 Use ConvertToLvlBindPoint.
1 parent 1262c68 commit 0e6ba0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

layers/state_tracker/cmd_buffer_state.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,8 @@ bool CommandBuffer::HasExternalFormatResolveAttachment() const {
17051705
}
17061706

17071707
void CommandBuffer::BindShader(VkShaderStageFlagBits shader_stage, vvl::ShaderObject *shader_object_state) {
1708-
auto &last_bound_state = lastBound[ConvertToPipelineBindPoint(shader_stage)];
1708+
const VkPipelineBindPoint pipeline_bind_point = ConvertToPipelineBindPoint(shader_stage);
1709+
auto &last_bound_state = lastBound[ConvertToLvlBindPoint(pipeline_bind_point)];
17091710
const auto stage_index = static_cast<uint32_t>(ConvertToShaderObjectStage(shader_stage));
17101711
last_bound_state.shader_object_bound[stage_index] = true;
17111712
last_bound_state.shader_object_states[stage_index] = shader_object_state;

0 commit comments

Comments
 (0)