summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2018-08-20 20:44:56 -0500
committerGravatar Subv2018-08-20 20:44:56 -0500
commitfc5b489b0f6db5bfb6b04c50071b161fed6bf7fa (patch)
tree567e6d3e32b69f5896f3e5ad93111a1fd828b2f7 /src
parentMerge pull request #1064 from lioncash/telemetry (diff)
downloadyuzu-fc5b489b0f6db5bfb6b04c50071b161fed6bf7fa.tar.gz
yuzu-fc5b489b0f6db5bfb6b04c50071b161fed6bf7fa.tar.xz
yuzu-fc5b489b0f6db5bfb6b04c50071b161fed6bf7fa.zip
Shaders: Log and crash when using an unimplemented texture type in a texture sampling instruction.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index ac6ccfec7..c8ff1cdf5 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1526,7 +1526,9 @@ private:
1526 break; 1526 break;
1527 } 1527 }
1528 default: 1528 default:
1529 UNIMPLEMENTED(); 1529 LOG_CRITICAL(HW_GPU, "Unhandled texture type {}",
1530 static_cast<u32>(instr.tex.texture_type.Value()));
1531 UNREACHABLE();
1530 } 1532 }
1531 1533
1532 const std::string sampler = 1534 const std::string sampler =
@@ -1576,7 +1578,9 @@ private:
1576 break; 1578 break;
1577 } 1579 }
1578 default: 1580 default:
1579 UNIMPLEMENTED(); 1581 LOG_CRITICAL(HW_GPU, "Unhandled texture type {}",
1582 static_cast<u32>(instr.texs.GetTextureType()));
1583 UNREACHABLE();
1580 } 1584 }
1581 const std::string sampler = GetSampler(instr.sampler, instr.texs.GetTextureType(), 1585 const std::string sampler = GetSampler(instr.sampler, instr.texs.GetTextureType(),
1582 instr.texs.IsArrayTexture()); 1586 instr.texs.IsArrayTexture());
@@ -1593,7 +1597,8 @@ private:
1593 switch (instr.tlds.GetTextureType()) { 1597 switch (instr.tlds.GetTextureType()) {
1594 case Tegra::Shader::TextureType::Texture2D: { 1598 case Tegra::Shader::TextureType::Texture2D: {
1595 if (instr.tlds.IsArrayTexture()) { 1599 if (instr.tlds.IsArrayTexture()) {
1596 UNIMPLEMENTED(); 1600 LOG_CRITICAL(HW_GPU, "Unhandled 2d array texture");
1601 UNREACHABLE();
1597 } else { 1602 } else {
1598 std::string x = regs.GetRegisterAsInteger(instr.gpr8); 1603 std::string x = regs.GetRegisterAsInteger(instr.gpr8);
1599 std::string y = regs.GetRegisterAsInteger(instr.gpr20); 1604 std::string y = regs.GetRegisterAsInteger(instr.gpr20);
@@ -1602,7 +1607,9 @@ private:
1602 break; 1607 break;
1603 } 1608 }
1604 default: 1609 default:
1605 UNIMPLEMENTED(); 1610 LOG_CRITICAL(HW_GPU, "Unhandled texture type {}",
1611 static_cast<u32>(instr.tlds.GetTextureType()));
1612 UNREACHABLE();
1606 } 1613 }
1607 const std::string sampler = GetSampler(instr.sampler, instr.tlds.GetTextureType(), 1614 const std::string sampler = GetSampler(instr.sampler, instr.tlds.GetTextureType(),
1608 instr.tlds.IsArrayTexture()); 1615 instr.tlds.IsArrayTexture());
@@ -1623,7 +1630,9 @@ private:
1623 break; 1630 break;
1624 } 1631 }
1625 default: 1632 default:
1626 UNIMPLEMENTED(); 1633 LOG_CRITICAL(HW_GPU, "Unhandled texture type {}",
1634 static_cast<u32>(instr.tld4.texture_type.Value()));
1635 UNREACHABLE();
1627 } 1636 }
1628 1637
1629 const std::string sampler = 1638 const std::string sampler =