[maxwell] fix ordering of sizes for atomicops (#2778)
S64 goes after F16x2FTZRN Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2778 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
87cacbeed4
commit
1b1ab551a9
1 changed files with 16 additions and 14 deletions
|
|
@ -12,21 +12,23 @@
|
|||
namespace Shader::Maxwell {
|
||||
namespace {
|
||||
enum class Type : u64 {
|
||||
_1D,
|
||||
BUFFER_1D,
|
||||
ARRAY_1D,
|
||||
_2D,
|
||||
ARRAY_2D,
|
||||
_3D,
|
||||
_1D = 0,
|
||||
_1D_BUFFER = 1,
|
||||
_1D_ARRAY = 2,
|
||||
_2D = 3,
|
||||
_2D_ARRAY = 4,
|
||||
_3D = 5,
|
||||
_UNK6 = 6,
|
||||
_UNK7 = 7,
|
||||
};
|
||||
|
||||
enum class Size : u64 {
|
||||
U32,
|
||||
S32,
|
||||
U64,
|
||||
S64,
|
||||
F32FTZRN,
|
||||
F16x2FTZRN,
|
||||
S64,
|
||||
SD32,
|
||||
SD64,
|
||||
};
|
||||
|
|
@ -53,19 +55,20 @@ TextureType GetType(Type type) {
|
|||
switch (type) {
|
||||
case Type::_1D:
|
||||
return TextureType::Color1D;
|
||||
case Type::BUFFER_1D:
|
||||
case Type::_1D_BUFFER:
|
||||
return TextureType::Buffer;
|
||||
case Type::ARRAY_1D:
|
||||
case Type::_1D_ARRAY:
|
||||
return TextureType::ColorArray1D;
|
||||
case Type::_2D:
|
||||
return TextureType::Color2D;
|
||||
case Type::ARRAY_2D:
|
||||
case Type::_2D_ARRAY:
|
||||
return TextureType::ColorArray2D;
|
||||
case Type::_3D:
|
||||
return TextureType::Color3D;
|
||||
}
|
||||
default:
|
||||
throw NotImplementedException("Invalid type {}", type);
|
||||
}
|
||||
}
|
||||
|
||||
IR::Value MakeCoords(TranslatorVisitor& v, IR::Reg reg, Type type) {
|
||||
const auto array{[&](int index) {
|
||||
|
|
@ -73,7 +76,7 @@ IR::Value MakeCoords(TranslatorVisitor& v, IR::Reg reg, Type type) {
|
|||
}};
|
||||
switch (type) {
|
||||
case Type::_1D:
|
||||
case Type::BUFFER_1D:
|
||||
case Type::_1D_BUFFER:
|
||||
return v.X(reg);
|
||||
case Type::ARRAY_1D:
|
||||
return v.ir.CompositeConstruct(v.X(reg), array(1));
|
||||
|
|
@ -84,10 +87,9 @@ IR::Value MakeCoords(TranslatorVisitor& v, IR::Reg reg, Type type) {
|
|||
case Type::_3D:
|
||||
return v.ir.CompositeConstruct(v.X(reg), v.X(reg + 1), v.X(reg + 2));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
throw NotImplementedException("Invalid type {}", type);
|
||||
}
|
||||
}
|
||||
|
||||
IR::Value ApplyAtomicOp(IR::IREmitter& ir, const IR::U32& handle, const IR::Value& coords,
|
||||
const IR::Value& op_b, IR::TextureInstInfo info, AtomicOp op,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue