mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
shader: implement SULD.D bits32
This commit is contained in:
parent
59e75f4372
commit
6d235b8631
|
@ -53,7 +53,6 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
|
|
||||||
switch (opcode->get().GetId()) {
|
switch (opcode->get().GetId()) {
|
||||||
case OpCode::Id::SULD: {
|
case OpCode::Id::SULD: {
|
||||||
UNIMPLEMENTED_IF(instr.suldst.mode != Tegra::Shader::SurfaceDataMode::P);
|
|
||||||
UNIMPLEMENTED_IF(instr.suldst.out_of_bounds_store !=
|
UNIMPLEMENTED_IF(instr.suldst.out_of_bounds_store !=
|
||||||
Tegra::Shader::OutOfBoundsStore::Ignore);
|
Tegra::Shader::OutOfBoundsStore::Ignore);
|
||||||
|
|
||||||
|
@ -62,6 +61,7 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
: GetBindlessImage(instr.gpr39, type)};
|
: GetBindlessImage(instr.gpr39, type)};
|
||||||
image.MarkRead();
|
image.MarkRead();
|
||||||
|
|
||||||
|
if (instr.suldst.mode == Tegra::Shader::SurfaceDataMode::P) {
|
||||||
u32 indexer = 0;
|
u32 indexer = 0;
|
||||||
for (u32 element = 0; element < 4; ++element) {
|
for (u32 element = 0; element < 4; ++element) {
|
||||||
if (!instr.suldst.IsComponentEnabled(element)) {
|
if (!instr.suldst.IsComponentEnabled(element)) {
|
||||||
|
@ -74,6 +74,22 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) {
|
||||||
for (u32 i = 0; i < indexer; ++i) {
|
for (u32 i = 0; i < indexer; ++i) {
|
||||||
SetRegister(bb, instr.gpr0.Value() + i, GetTemporary(i));
|
SetRegister(bb, instr.gpr0.Value() + i, GetTemporary(i));
|
||||||
}
|
}
|
||||||
|
} else if (instr.suldst.mode == Tegra::Shader::SurfaceDataMode::D_BA) {
|
||||||
|
UNIMPLEMENTED_IF(instr.suldst.GetStoreDataLayout() != StoreType::Bits32);
|
||||||
|
|
||||||
|
switch (instr.suldst.GetStoreDataLayout()) {
|
||||||
|
case StoreType::Bits32: {
|
||||||
|
MetaImage meta{image, {}, {}};
|
||||||
|
Node value = Operation(OperationCode::ImageLoad, meta, GetCoordinates(type));
|
||||||
|
SetTemporary(bb, 0, std::move(value));
|
||||||
|
SetRegister(bb, instr.gpr0.Value(), GetTemporary(0));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OpCode::Id::SUST: {
|
case OpCode::Id::SUST: {
|
||||||
|
|
Loading…
Reference in a new issue