shader: Address Feedback
This commit is contained in:
parent
45d547af11
commit
baec84247f
16 changed files with 60 additions and 211 deletions
|
@ -5,8 +5,8 @@
|
|||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
#include "shader_recompiler/frontend/ir/modifiers.h"
|
||||
#include "shader_recompiler/frontend/maxwell/translate/impl/impl.h"
|
||||
#include "shader_recompiler/frontend/maxwell/opcodes.h"
|
||||
#include "shader_recompiler/frontend/maxwell/translate/impl/impl.h"
|
||||
|
||||
namespace Shader::Maxwell {
|
||||
namespace {
|
||||
|
@ -21,28 +21,24 @@ enum class LocalScope : u64 {
|
|||
IR::MemoryScope LocalScopeToMemoryScope(LocalScope scope) {
|
||||
switch (scope) {
|
||||
case LocalScope::CTG:
|
||||
return IR::MemoryScope::Warp;
|
||||
return IR::MemoryScope::Workgroup;
|
||||
case LocalScope::GL:
|
||||
return IR::MemoryScope::Device;
|
||||
case LocalScope::SYS:
|
||||
return IR::MemoryScope::System;
|
||||
case LocalScope::VC:
|
||||
return IR::MemoryScope::Workgroup; // or should be device?
|
||||
default:
|
||||
throw NotImplementedException("Unimplemented Local Scope {}", scope);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // Anonymous namespace
|
||||
|
||||
void TranslatorVisitor::MEMBAR(u64 inst) {
|
||||
union {
|
||||
u64 raw;
|
||||
BitField<8, 2, LocalScope> scope;
|
||||
} membar{inst};
|
||||
IR::BarrierInstInfo info{};
|
||||
info.scope.Assign(LocalScopeToMemoryScope(membar.scope));
|
||||
ir.MemoryBarrier(info);
|
||||
ir.MemoryBarrier(LocalScopeToMemoryScope(membar.scope));
|
||||
}
|
||||
|
||||
void TranslatorVisitor::DEPBAR() {
|
||||
|
|
|
@ -96,8 +96,10 @@ enum class SpecialRegister : u64 {
|
|||
case SpecialRegister::SR_CTAID_Z:
|
||||
return ir.WorkgroupIdZ();
|
||||
case SpecialRegister::SR_WSCALEFACTOR_XY:
|
||||
// LOG_WARNING(ShaderDecompiler, "SR_WSCALEFACTOR_XY (Stubbed)");
|
||||
return ir.Imm32(Common::BitCast<u32>(1.0f));
|
||||
case SpecialRegister::SR_WSCALEFACTOR_Z:
|
||||
// LOG_WARNING(ShaderDecompiler, "SR_WSCALEFACTOR_Z (Stubbed)");
|
||||
return ir.Imm32(Common::BitCast<u32>(1.0f));
|
||||
case SpecialRegister::SR_LANEID:
|
||||
return ir.LaneId();
|
||||
|
|
|
@ -50,10 +50,7 @@ void TranslatorVisitor::VOTE(u64 insn) {
|
|||
}
|
||||
|
||||
void TranslatorVisitor::VOTE_vtg(u64) {
|
||||
// LOG_WARNING("VOTE.VTG: Stubbed!");
|
||||
auto imm = ir.Imm1(false);
|
||||
ir.SetFCSMFlag(imm);
|
||||
ir.SetTRFlag(imm);
|
||||
// LOG_WARNING(ShaderDecompiler, "VOTE.VTG: Stubbed!");
|
||||
}
|
||||
|
||||
} // namespace Shader::Maxwell
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue