Skip to content

Commit

Permalink
Added GraphicsPipeline::validate_vk() method to make it possible to q…
Browse files Browse the repository at this point in the history
…uery the Vulkan pipeline with add check against the validity of the viewID for that pipeline.
  • Loading branch information
robertosfield committed Sep 6, 2023
1 parent 85d2982 commit 67c96c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/vsg/state/GraphicsPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ namespace vsg

GraphicsPipeline(PipelineLayout* pipelineLayout, const ShaderStages& shaderStages, const GraphicsPipelineStates& pipelineStates, uint32_t subpass = 0);

/// return the Vukan Pipeline for specified viewID.
VkPipeline vk(uint32_t viewID) const { return _implementation[viewID]->_pipeline; }

/// variant of vk(viewID) method that is slower but adds validation of the viewID parameter
VkPipeline validated_vk(uint32_t viewID) const { return (viewID < _implementation.size()) ? (_implementation[viewID] ? _implementation[viewID]->_pipeline : 0) : 0; }

/// VkGraphicsPipelineCreateInfo settings
ShaderStages stages;
GraphicsPipelineStates pipelineStates;
Expand Down

0 comments on commit 67c96c0

Please sign in to comment.