#include "state_tracker/shader_module.h"
#include <sstream>
#include <string>
#include <queue>
#include "utils/hash_util.h"
#include "generated/spirv_grammar_helper.h"
#include "spirv/1.2/GLSL.std.450.h"
namespace spirv {
void DecorationBase::Add(uint32_t decoration, uint32_t value) { … }
void DecorationSet::Add(uint32_t decoration, uint32_t value) { … }
bool DecorationSet::HasAnyBuiltIn() const { … }
bool DecorationSet::HasInMember(FlagBit flag_bit) const { … }
bool DecorationSet::AllMemberHave(FlagBit flag_bit) const { … }
void ExecutionModeSet::Add(const Instruction& insn) { … }
static uint32_t ExecutionModelToShaderStageFlagBits(uint32_t mode) { … }
static void FindPointersAndObjects(const Instruction& insn, vvl::unordered_set<uint32_t>& result) { … }
bool EntryPoint::IsBuiltInWritten(spv::BuiltIn built_in, const Module& module_state, const StageInterfaceVariable& variable,
const AccessChainVariableMap& access_chain_map) { … }
vvl::unordered_set<uint32_t> EntryPoint::GetAccessibleIds(const Module& module_state, EntryPoint& entrypoint) { … }
std::vector<StageInterfaceVariable> EntryPoint::GetStageInterfaceVariables(const Module& module_state, const EntryPoint& entrypoint,
const VariableAccessMap& variable_access_map,
const DebugNameMap& debug_name_map) { … }
std::vector<ResourceInterfaceVariable> EntryPoint::GetResourceInterfaceVariables(const Module& module_state, EntryPoint& entrypoint,
const ImageAccessMap& image_access_map,
const AccessChainVariableMap& access_chain_map,
const VariableAccessMap& variable_access_map,
const DebugNameMap& debug_name_map) { … }
static inline bool IsImageOperandsBiasOffset(uint32_t type) { … }
ImageAccess::ImageAccess(const Module& module_state, const Instruction& image_insn, const FuncParameterMap& func_parameter_map)
: … { … }
EntryPoint::EntryPoint(const Module& module_state, const Instruction& entrypoint_insn, const ImageAccessMap& image_access_map,
const AccessChainVariableMap& access_chain_map, const VariableAccessMap& variable_access_map,
const DebugNameMap& debug_name_map)
: … { … }
std::optional<VkPrimitiveTopology> Module::GetTopology(const EntryPoint& entrypoint) const { … }
Module::StaticData::StaticData(const Module& module_state, StatelessData* stateless_data) { … }
std::string Module::GetDecorations(uint32_t id) const { … }
std::string Module::GetName(uint32_t id) const { … }
std::string Module::GetMemberName(uint32_t id, uint32_t member_index) const { … }
void Module::DescribeTypeInner(std::ostringstream& ss, uint32_t type, uint32_t indent) const { … }
std::string Module::DescribeType(uint32_t type) const { … }
std::string Module::DescribeVariable(uint32_t id) const { … }
std::shared_ptr<const EntryPoint> Module::FindEntrypoint(char const* name, VkShaderStageFlagBits stageBits) const { … }
bool Module::FindLocalSize(const EntryPoint& entrypoint, uint32_t& local_size_x, uint32_t& local_size_y,
uint32_t& local_size_z) const { … }
uint32_t Module::CalculateWorkgroupSharedMemory() const { … }
const Instruction* Module::GetConstantDef(uint32_t id) const { … }
uint32_t Module::GetConstantValueById(uint32_t id) const { … }
uint32_t Module::GetLocationsConsumedByType(uint32_t type) const { … }
uint32_t Module::GetComponentsConsumedByType(uint32_t type) const { … }
NumericType Module::GetNumericType(uint32_t type) const { … }
bool Module::HasRuntimeArray(uint32_t type_id) const { … }
std::string InterfaceSlot::Describe() const { … }
uint32_t GetFormatType(VkFormat format) { … }
char const* string_NumericType(uint32_t type) { … }
const char* VariableBase::FindDebugName(const VariableBase& variable, const DebugNameMap& debug_name_map) { … }
VariableBase::VariableBase(const Module& module_state, const Instruction& insn, VkShaderStageFlagBits stage,
const VariableAccessMap& variable_access_map, const DebugNameMap& debug_name_map)
: … { … }
std::string VariableBase::DescribeDescriptor() const { … }
bool StageInterfaceVariable::IsPerTaskNV(const StageInterfaceVariable& variable) { … }
bool StageInterfaceVariable::IsArrayInterface(const StageInterfaceVariable& variable) { … }
const Instruction& StageInterfaceVariable::FindBaseType(StageInterfaceVariable& variable, const Module& module_state) { … }
bool StageInterfaceVariable::IsBuiltin(const StageInterfaceVariable& variable, const Module& module_state) { … }
static uint32_t GetStructInterfaceSlots(const Module& module_state, std::shared_ptr<const TypeStructInfo> type_struct_info,
std::vector<InterfaceSlot>& slots, uint32_t starting_location) { … }
std::vector<InterfaceSlot> StageInterfaceVariable::GetInterfaceSlots(StageInterfaceVariable& variable, const Module& module_state) { … }
std::vector<uint32_t> StageInterfaceVariable::GetBuiltinBlock(const StageInterfaceVariable& variable, const Module& module_state) { … }
uint32_t StageInterfaceVariable::GetBuiltinComponents(const StageInterfaceVariable& variable, const Module& module_state) { … }
StageInterfaceVariable::StageInterfaceVariable(const Module& module_state, const Instruction& insn, VkShaderStageFlagBits stage,
const VariableAccessMap& variable_access_map, const DebugNameMap& debug_name_map)
: … { … }
const Instruction& ResourceInterfaceVariable::FindBaseType(ResourceInterfaceVariable& variable, const Module& module_state) { … }
bool ResourceInterfaceVariable::IsDynamicAccessed(ResourceInterfaceVariable& variable, const Module& module_state,
const AccessChainVariableMap& access_chain_map) { … }
uint32_t ResourceInterfaceVariable::FindImageSampledTypeWidth(const Module& module_state, const Instruction& base_type) { … }
NumericType ResourceInterfaceVariable::FindImageFormatType(const Module& module_state, const Instruction& base_type) { … }
bool ResourceInterfaceVariable::IsStorageBuffer(const ResourceInterfaceVariable& variable) { … }
ResourceInterfaceVariable::ResourceInterfaceVariable(const Module& module_state, const EntryPoint& entrypoint,
const Instruction& insn, const ImageAccessMap& image_access_map,
const AccessChainVariableMap& access_chain_map,
const VariableAccessMap& variable_access_map,
const DebugNameMap& debug_name_map)
: … { … }
PushConstantVariable::PushConstantVariable(const Module& module_state, const Instruction& insn, VkShaderStageFlagBits stage,
const VariableAccessMap& variable_access_map, const DebugNameMap& debug_name_map)
: … { … }
TypeStructInfo::TypeStructInfo(const Module& module_state, const Instruction& struct_insn)
: … { … }
TypeStructSize TypeStructInfo::GetSize(const Module& module_state) const { … }
uint32_t Module::GetNumComponentsInBaseType(const Instruction* insn) const { … }
uint32_t Module::GetTypeBitsSize(const Instruction* insn) const { … }
uint32_t Module::GetTypeBytesSize(const Instruction* insn) const { … }
uint32_t Module::GetBaseType(const Instruction* insn) const { … }
const Instruction* Module::GetBaseTypeInstruction(uint32_t type) const { … }
uint32_t Module::GetTypeId(uint32_t id) const { … }
uint32_t Module::GetTexelComponentCount(const Instruction& insn) const { … }
uint32_t Module::GetFlattenArraySize(const Instruction& insn) const { … }
AtomicInstructionInfo Module::GetAtomicInfo(const Instruction& insn) const { … }
}