#include "state_tracker/pipeline_state.h"
#include "state_tracker/descriptor_sets.h"
#include "state_tracker/cmd_buffer_state.h"
#include "state_tracker/render_pass_state.h"
#include "state_tracker/state_object.h"
#include "generated/enum_flag_bits.h"
#include "state_tracker/shader_object_state.h"
#include "chassis/chassis_modification_state.h"
namespace vvl {
static vku::safe_VkGraphicsPipelineCreateInfo MakeGraphicsCreateInfo(const VkGraphicsPipelineCreateInfo &ci,
std::shared_ptr<const vvl::RenderPass> rpstate,
const ValidationStateTracker &state_data) { … }
std::vector<ShaderStageState> Pipeline::GetStageStates(const ValidationStateTracker &state_data, const Pipeline &pipe_state,
spirv::StatelessData *stateless_data) { … }
static uint32_t GetCreateInfoShaders(const Pipeline &pipe_state) { … }
static uint32_t GetLinkingShaders(const VkPipelineLibraryCreateInfoKHR *link_info, const ValidationStateTracker &state_data) { … }
static CBDynamicFlags GetGraphicsDynamicState(Pipeline &pipe_state) { … }
static CBDynamicFlags GetRayTracingDynamicState(Pipeline &pipe_state) { … }
static bool UsesPipelineRobustness(const void *pNext, const Pipeline &pipe_state) { … }
static bool UsesPipelineVertexRobustness(const void *pNext, const Pipeline &pipe_state) { … }
static bool IgnoreColorAttachments(const ValidationStateTracker &state_data, Pipeline &pipe_state) { … }
static bool UsesShaderModuleId(const Pipeline &pipe_state) { … }
static vvl::unordered_set<uint32_t> GetFSOutputLocations(const std::vector<ShaderStageState> &stage_states) { … }
static VkPrimitiveTopology GetTopologyAtRasterizer(const Pipeline &pipeline) { … }
static VkPipelineCreateFlags2KHR GetPipelineCreateFlags(const void *pNext, VkPipelineCreateFlags flags) { … }
std::shared_ptr<VertexInputState> Pipeline::CreateVertexInputState(const Pipeline &p, const ValidationStateTracker &state,
const vku::safe_VkGraphicsPipelineCreateInfo &create_info) { … }
std::shared_ptr<PreRasterState> Pipeline::CreatePreRasterState(
const Pipeline &p, const ValidationStateTracker &state, const vku::safe_VkGraphicsPipelineCreateInfo &create_info,
const std::shared_ptr<const vvl::RenderPass> &rp, spirv::StatelessData stateless_data[kCommonMaxGraphicsShaderStages]) { … }
std::shared_ptr<FragmentShaderState> Pipeline::CreateFragmentShaderState(
const Pipeline &p, const ValidationStateTracker &state, const VkGraphicsPipelineCreateInfo &create_info,
const vku::safe_VkGraphicsPipelineCreateInfo &safe_create_info, const std::shared_ptr<const vvl::RenderPass> &rp,
spirv::StatelessData stateless_data[kCommonMaxGraphicsShaderStages]) { … }
std::shared_ptr<FragmentOutputState> Pipeline::CreateFragmentOutputState(
const Pipeline &p, const ValidationStateTracker &state, const VkGraphicsPipelineCreateInfo &create_info,
const vku::safe_VkGraphicsPipelineCreateInfo &safe_create_info, const std::shared_ptr<const vvl::RenderPass> &rp) { … }
std::vector<std::shared_ptr<const vvl::PipelineLayout>> Pipeline::PipelineLayoutStateUnion() const { … }
std::shared_ptr<const vvl::ShaderModule> Pipeline::GetSubStateShader(VkShaderStageFlagBits state) const { … }
Pipeline::Pipeline(const ValidationStateTracker &state_data, const VkGraphicsPipelineCreateInfo *pCreateInfo,
std::shared_ptr<const vvl::PipelineCache> &&pipe_cache, std::shared_ptr<const vvl::RenderPass> &&rpstate,
std::shared_ptr<const vvl::PipelineLayout> &&layout,
spirv::StatelessData stateless_data[kCommonMaxGraphicsShaderStages])
: … { … }
Pipeline::Pipeline(const ValidationStateTracker &state_data, const VkComputePipelineCreateInfo *pCreateInfo,
std::shared_ptr<const vvl::PipelineCache> &&pipe_cache, std::shared_ptr<const vvl::PipelineLayout> &&layout,
spirv::StatelessData *stateless_data)
: … { … }
Pipeline::Pipeline(const ValidationStateTracker &state_data, const VkRayTracingPipelineCreateInfoKHR *pCreateInfo,
std::shared_ptr<const vvl::PipelineCache> &&pipe_cache, std::shared_ptr<const vvl::PipelineLayout> &&layout,
spirv::StatelessData *stateless_data)
: … { … }
Pipeline::Pipeline(const ValidationStateTracker &state_data, const VkRayTracingPipelineCreateInfoNV *pCreateInfo,
std::shared_ptr<const vvl::PipelineCache> &&pipe_cache, std::shared_ptr<const vvl::PipelineLayout> &&layout,
spirv::StatelessData *stateless_data)
: … { … }
}
void LastBound::UnbindAndResetPushDescriptorSet(std::shared_ptr<vvl::DescriptorSet> &&ds) { … }
void LastBound::Reset() { … }
bool LastBound::IsDepthTestEnable() const { … }
bool LastBound::IsDepthBoundTestEnable() const { … }
bool LastBound::IsDepthWriteEnable() const { … }
bool LastBound::IsDepthBiasEnable() const { … }
bool LastBound::IsStencilTestEnable() const { … }
VkStencilOpState LastBound::GetStencilOpStateFront() const { … }
VkStencilOpState LastBound::GetStencilOpStateBack() const { … }
VkSampleCountFlagBits LastBound::GetRasterizationSamples() const { … }
bool LastBound::IsRasterizationDisabled() const { … }
bool LastBound::IsLogicOpEnabled() const { … }
VkColorComponentFlags LastBound::GetColorWriteMask(uint32_t i) const { … }
bool LastBound::IsColorWriteEnabled(uint32_t i) const { … }
VkPrimitiveTopology LastBound::GetPrimitiveTopology() const { … }
VkCullModeFlags LastBound::GetCullMode() const { … }
VkConservativeRasterizationModeEXT LastBound::GetConservativeRasterizationMode() const { … }
bool LastBound::IsSampleLocationsEnable() const { … }
bool LastBound::IsExclusiveScissorEnabled() const { … }
bool LastBound::IsCoverageToColorEnabled() const { … }
bool LastBound::IsCoverageModulationTableEnable() const { … }
VkCoverageModulationModeNV LastBound::GetCoverageModulationMode() const { … }
bool LastBound::ValidShaderObjectCombination(const VkPipelineBindPoint bind_point, const DeviceFeatures &device_features) const { … }
VkShaderEXT LastBound::GetShader(ShaderObjectStage stage) const { … }
vvl::ShaderObject *LastBound::GetShaderState(ShaderObjectStage stage) const { … }
bool LastBound::HasShaderObjects() const { … }
bool LastBound::IsValidShaderBound(ShaderObjectStage stage) const { … }
bool LastBound::IsValidShaderOrNullBound(ShaderObjectStage stage) const { … }
std::vector<vvl::ShaderObject *> LastBound::GetAllBoundGraphicsShaders() { … }
bool LastBound::IsAnyGraphicsShaderBound() const { … }
bool LastBound::IsBoundSetCompatible(uint32_t set, const vvl::PipelineLayout &pipeline_layout) const { … }
bool LastBound::IsBoundSetCompatible(uint32_t set, const vvl::ShaderObject &shader_object_state) const {
if ((set >= per_set.size()) || (set >= shader_object_state.set_compat_ids.size())) {
return false;
}
return (*(per_set[set].compat_id_for_set) == *(shader_object_state.set_compat_ids[set]));
};
std::string LastBound::DescribeNonCompatibleSet(uint32_t set, const vvl::PipelineLayout &pipeline_layout) const { … }
std::string LastBound::DescribeNonCompatibleSet(uint32_t set, const vvl::ShaderObject &shader_object_state) const { … }
const spirv::EntryPoint *LastBound::GetFragmentEntryPoint() const { … }