mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 16:23:05 +00:00
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#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 <cstdint>
|
|
#include <vector>
|
|
|
|
namespace Libs::Graphics::ShaderRecompiler::Frontend {
|
|
|
|
struct EmbeddedFetchLoad {
|
|
uint32_t pc = 0;
|
|
int attrib_id = -1;
|
|
uint32_t components = 0;
|
|
};
|
|
|
|
struct EmbeddedFetchPlan {
|
|
std::vector<EmbeddedFetchLoad> 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
|