Browse Source
Merge pull request #788 from bunnei/shader-check-zero
gl_shader_decompiler: Check if SetRegister result is ZeroIndex.
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
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); |
|
|
|
|