summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-24 04:44:05 +0200
committerGitHub <noreply@github.com>2018-07-24 04:44:05 +0200
commitc2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc (patch)
tree5709472851d01f543891fa365cb850b94ecdb1fb
parentVFS Regression and Accuracy Fixes (#776) (diff)
parentgl_shader_decompiler: Check if SetRegister result is ZeroIndex. (diff)
downloadyuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.tar
yuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.tar.gz
yuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.tar.bz2
yuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.tar.lz
yuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.tar.xz
yuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.tar.zst
yuzu-c2b4ff5d4884fb9e36f7a7cae08c30fa5e995ecc.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 4e36b6de8..f4ad42335 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -488,6 +488,12 @@ private:
*/
void SetRegister(const Register& reg, u64 elem, const std::string& value,
u64 dest_num_components, u64 value_num_components, u64 dest_elem) {
+ if (reg == Register::ZeroIndex) {
+ LOG_CRITICAL(HW_GPU, "Cannot set Register::ZeroIndex");
+ UNREACHABLE();
+ return;
+ }
+
std::string dest = GetRegister(reg, static_cast<u32>(dest_elem));
if (dest_num_components > 1) {
dest += GetSwizzle(elem);