yuzu-emu
/
yuzu
Archived
1
0
Fork 0

shader: Keep track of shaders using warp instructions

This commit is contained in:
ReinUsesLisp 2019-12-09 23:40:32 -03:00
parent 6233b1db08
commit 9ad6327fbd
No known key found for this signature in database
GPG Key ID: 2DFC508897B39CFE
2 changed files with 8 additions and 0 deletions

View File

@ -38,6 +38,9 @@ u32 ShaderIR::DecodeWarp(NodeBlock& bb, u32 pc) {
const Instruction instr = {program_code[pc]}; const Instruction instr = {program_code[pc]};
const auto opcode = OpCode::Decode(instr); const auto opcode = OpCode::Decode(instr);
// Signal the backend that this shader uses warp instructions.
uses_warps = true;
switch (opcode->get().GetId()) { switch (opcode->get().GetId()) {
case OpCode::Id::VOTE: { case OpCode::Id::VOTE: {
const Node value = GetPredicate(instr.vote.value, instr.vote.negate_value != 0); const Node value = GetPredicate(instr.vote.value, instr.vote.negate_value != 0);

View File

@ -137,6 +137,10 @@ public:
return uses_vertex_id; return uses_vertex_id;
} }
bool UsesWarps() const {
return uses_warps;
}
bool HasPhysicalAttributes() const { bool HasPhysicalAttributes() const {
return uses_physical_attributes; return uses_physical_attributes;
} }
@ -415,6 +419,7 @@ private:
bool uses_physical_attributes{}; // Shader uses AL2P or physical attribute read/writes bool uses_physical_attributes{}; // Shader uses AL2P or physical attribute read/writes
bool uses_instance_id{}; bool uses_instance_id{};
bool uses_vertex_id{}; bool uses_vertex_id{};
bool uses_warps{};
Tegra::Shader::Header header; Tegra::Shader::Header header;
}; };