shader_decode: SULD.D implement bits64 and reverse shader ir init method to removed shader stage.

This commit is contained in:
namkazy
2020-04-06 13:09:19 +07:00
parent 730f9b55b3
commit 2906372ba1
5 changed files with 104 additions and 45 deletions

View File

@ -68,8 +68,8 @@ struct GlobalMemoryUsage {
class ShaderIR final {
public:
explicit ShaderIR(const ProgramCode& program_code, Tegra::Engines::ShaderType shader_stage,
u32 main_offset, CompilerSettings settings, Registry& registry);
explicit ShaderIR(const ProgramCode& program_code, u32 main_offset, CompilerSettings settings,
Registry& registry);
~ShaderIR();
const std::map<u32, NodeBlock>& GetBasicBlocks() const {
@ -312,6 +312,10 @@ private:
/// Conditionally saturates a half float pair
Node GetSaturatedHalfFloat(Node value, bool saturate = true);
/// Get image component value by type and size
Node GetComponentValue(Tegra::Texture::ComponentType component_type, u32 component_size,
const Node original_value, bool* is_signed);
/// Returns a predicate comparing two floats
Node GetPredicateComparisonFloat(Tegra::Shader::PredCondition condition, Node op_a, Node op_b);
/// Returns a predicate comparing two integers
@ -419,7 +423,6 @@ private:
u32 NewCustomVariable();
const ProgramCode& program_code;
const Tegra::Engines::ShaderType shader_stage;
const u32 main_offset;
const CompilerSettings settings;
Registry& registry;