Browse Source

maxwell experiemnt

pull/2769/head
Ribbit 5 months ago
committed by crueter
parent
commit
c991c4bfed
  1. 7
      src/shader_recompiler/frontend/maxwell/translate/impl/surface_atomic_operations.cpp

7
src/shader_recompiler/frontend/maxwell/translate/impl/surface_atomic_operations.cpp

@ -65,12 +65,19 @@ TextureType GetType(Type type) {
}
IR::Value MakeCoords(TranslatorVisitor& v, IR::Reg reg, Type type) {
const auto array{[&](int index) {
return v.ir.BitFieldExtract(v.X(reg + index), v.ir.Imm32(0), v.ir.Imm32(16));
}};
switch (type) {
case Type::_1D:
case Type::BUFFER_1D:
return v.X(reg);
case Type::ARRAY_1D:
return v.ir.CompositeConstruct(v.X(reg), array(1));
case Type::_2D:
return v.ir.CompositeConstruct(v.X(reg), v.X(reg + 1));
case Type::ARRAY_2D:
return v.ir.CompositeConstruct(v.X(reg), v.X(reg + 1), array(2));
case Type::_3D:
return v.ir.CompositeConstruct(v.X(reg), v.X(reg + 1), v.X(reg + 2));
default:

Loading…
Cancel
Save