#pragma once #include "graphics/shader/recompiler/frontend/cfg/ShaderCFG.h" #include "graphics/shader/recompiler/frontend/decode/ShaderDecoder.h" #include "graphics/shader/recompiler/ir/ShaderIR.h" #include #include namespace Libs::Graphics::ShaderRecompiler::Frontend { struct EmbeddedFetchLoad { uint32_t pc = 0; int attrib_id = -1; uint32_t components = 0; }; struct EmbeddedFetchPlan { std::vector loads; int32_t vertex_offset_sgpr = -1; int32_t instance_offset_sgpr = -1; }; struct TranslateOptions { ShaderType stage = ShaderType::Unknown; uint32_t wave_size = 64; uint64_t shader_hash = 0; uint32_t user_data_base = 0; uint32_t user_data_count = 64; ShaderStageInputInfo input_info; const EmbeddedFetchPlan* embedded_fetch = nullptr; }; IR::Program TranslateProgram(const Decoder::Program& decoded, const CFG::Graph& cfg, const TranslateOptions& options); } // namespace Libs::Graphics::ShaderRecompiler::Frontend