summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-02 16:44:43 +0200
committerGitHub <noreply@github.com>2018-09-02 16:44:43 +0200
commit177c45e97d26d42b0e63e18163fcfc00b5b8a1ab (patch)
tree30c43b271255d7d1d3877d036d04c2f5781dc4af /src/video_core/renderer_opengl
parentMerge pull request #1216 from ogniK5377/ffma-assert (diff)
parentAdded better asserts to IPA, Renamed IPA modes to match mesa (diff)
downloadyuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.tar
yuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.tar.gz
yuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.tar.bz2
yuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.tar.lz
yuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.tar.xz
yuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.tar.zst
yuzu-177c45e97d26d42b0e63e18163fcfc00b5b8a1ab.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index e7d581d2d..274c2854b 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -2125,8 +2125,12 @@ private:
case OpCode::Id::IPA: {
const auto& attribute = instr.attribute.fmt28;
const auto& reg = instr.gpr0;
- switch (instr.ipa.mode) {
- case Tegra::Shader::IpaMode::Pass:
+ ASSERT_MSG(instr.ipa.sample_mode == Tegra::Shader::IpaSampleMode::Default,
+ "Unhandled IPA sample mode: {}",
+ static_cast<u32>(instr.ipa.sample_mode.Value()));
+ ASSERT_MSG(instr.ipa.saturate == 0, "IPA saturate not implemented");
+ switch (instr.ipa.interp_mode) {
+ case Tegra::Shader::IpaInterpMode::Linear:
if (stage == Maxwell3D::Regs::ShaderStage::Fragment &&
attribute.index == Attribute::Index::Position) {
switch (attribute.element) {
@@ -2147,12 +2151,12 @@ private:
regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index);
}
break;
- case Tegra::Shader::IpaMode::None:
+ case Tegra::Shader::IpaInterpMode::Perspective:
regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index);
break;
default:
LOG_CRITICAL(HW_GPU, "Unhandled IPA mode: {}",
- static_cast<u32>(instr.ipa.mode.Value()));
+ static_cast<u32>(instr.ipa.interp_mode.Value()));
UNREACHABLE();
regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index);
}