mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-23 01:25:52 +01:00
commit
bc679c9b8c
@ -2026,9 +2026,12 @@ private:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OpCode::Id::TLDS: {
|
case OpCode::Id::TLDS: {
|
||||||
ASSERT(instr.tlds.GetTextureType() == Tegra::Shader::TextureType::Texture2D);
|
|
||||||
ASSERT(instr.tlds.IsArrayTexture() == false);
|
|
||||||
std::string coord;
|
std::string coord;
|
||||||
|
const Tegra::Shader::TextureType texture_type{instr.tlds.GetTextureType()};
|
||||||
|
const bool is_array{instr.tlds.IsArrayTexture()};
|
||||||
|
|
||||||
|
ASSERT(texture_type == Tegra::Shader::TextureType::Texture2D);
|
||||||
|
ASSERT(is_array == false);
|
||||||
|
|
||||||
ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::NODEP),
|
ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::NODEP),
|
||||||
"NODEP is not implemented");
|
"NODEP is not implemented");
|
||||||
@ -2037,9 +2040,14 @@ private:
|
|||||||
ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ),
|
ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ),
|
||||||
"MZ is not implemented");
|
"MZ is not implemented");
|
||||||
|
|
||||||
switch (instr.tlds.GetTextureType()) {
|
switch (texture_type) {
|
||||||
|
case Tegra::Shader::TextureType::Texture1D: {
|
||||||
|
const std::string x = regs.GetRegisterAsInteger(instr.gpr8);
|
||||||
|
coord = "int coords = " + x + ';';
|
||||||
|
break;
|
||||||
|
}
|
||||||
case Tegra::Shader::TextureType::Texture2D: {
|
case Tegra::Shader::TextureType::Texture2D: {
|
||||||
if (instr.tlds.IsArrayTexture()) {
|
if (is_array) {
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled 2d array texture");
|
LOG_CRITICAL(HW_GPU, "Unhandled 2d array texture");
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
} else {
|
} else {
|
||||||
@ -2051,11 +2059,11 @@ private:
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled texture type {}",
|
LOG_CRITICAL(HW_GPU, "Unhandled texture type {}",
|
||||||
static_cast<u32>(instr.tlds.GetTextureType()));
|
static_cast<u32>(texture_type));
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
const std::string sampler = GetSampler(instr.sampler, instr.tlds.GetTextureType(),
|
|
||||||
instr.tlds.IsArrayTexture());
|
const std::string sampler = GetSampler(instr.sampler, texture_type, is_array);
|
||||||
const std::string texture = "texelFetch(" + sampler + ", coords, 0)";
|
const std::string texture = "texelFetch(" + sampler + ", coords, 0)";
|
||||||
WriteTexsInstruction(instr, coord, texture);
|
WriteTexsInstruction(instr, coord, texture);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user