diff options
| author | 2018-06-18 19:50:35 -0500 | |
|---|---|---|
| committer | 2018-06-18 19:50:35 -0500 | |
| commit | eab7457c00e4ab21ea2533441de03ff9cdda5ff3 (patch) | |
| tree | f187d57807adbca8cbf87f3d2fe9915f06b09224 /src/video_core/engines | |
| parent | Merge pull request #570 from bunnei/astc (diff) | |
| download | yuzu-eab7457c00e4ab21ea2533441de03ff9cdda5ff3.tar.gz yuzu-eab7457c00e4ab21ea2533441de03ff9cdda5ff3.tar.xz yuzu-eab7457c00e4ab21ea2533441de03ff9cdda5ff3.zip | |
GPU: Don't mark uniform buffers and registers as used for instructions which don't have them.
Like the MOV32I and FMUL32I instructions.
This fixes a potential crash when using these instructions.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index cefd57f4c..5ff861b04 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -526,6 +526,7 @@ public: | |||
| 526 | enum class Type { | 526 | enum class Type { |
| 527 | Trivial, | 527 | Trivial, |
| 528 | Arithmetic, | 528 | Arithmetic, |
| 529 | ArithmeticImmediate, | ||
| 529 | ArithmeticInteger, | 530 | ArithmeticInteger, |
| 530 | ArithmeticIntegerImmediate, | 531 | ArithmeticIntegerImmediate, |
| 531 | Bfe, | 532 | Bfe, |
| @@ -655,7 +656,7 @@ private: | |||
| 655 | INST("0100110001101---", Id::FMUL_C, Type::Arithmetic, "FMUL_C"), | 656 | INST("0100110001101---", Id::FMUL_C, Type::Arithmetic, "FMUL_C"), |
| 656 | INST("0101110001101---", Id::FMUL_R, Type::Arithmetic, "FMUL_R"), | 657 | INST("0101110001101---", Id::FMUL_R, Type::Arithmetic, "FMUL_R"), |
| 657 | INST("0011100-01101---", Id::FMUL_IMM, Type::Arithmetic, "FMUL_IMM"), | 658 | INST("0011100-01101---", Id::FMUL_IMM, Type::Arithmetic, "FMUL_IMM"), |
| 658 | INST("00011110--------", Id::FMUL32_IMM, Type::Arithmetic, "FMUL32_IMM"), | 659 | INST("00011110--------", Id::FMUL32_IMM, Type::ArithmeticImmediate, "FMUL32_IMM"), |
| 659 | INST("0100110000010---", Id::IADD_C, Type::ArithmeticInteger, "IADD_C"), | 660 | INST("0100110000010---", Id::IADD_C, Type::ArithmeticInteger, "IADD_C"), |
| 660 | INST("0101110000010---", Id::IADD_R, Type::ArithmeticInteger, "IADD_R"), | 661 | INST("0101110000010---", Id::IADD_R, Type::ArithmeticInteger, "IADD_R"), |
| 661 | INST("0011100-00010---", Id::IADD_IMM, Type::ArithmeticInteger, "IADD_IMM"), | 662 | INST("0011100-00010---", Id::IADD_IMM, Type::ArithmeticInteger, "IADD_IMM"), |
| @@ -676,7 +677,7 @@ private: | |||
| 676 | INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"), | 677 | INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"), |
| 677 | INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"), | 678 | INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"), |
| 678 | INST("0011100-10011---", Id::MOV_IMM, Type::Arithmetic, "MOV_IMM"), | 679 | INST("0011100-10011---", Id::MOV_IMM, Type::Arithmetic, "MOV_IMM"), |
| 679 | INST("000000010000----", Id::MOV32_IMM, Type::Arithmetic, "MOV32_IMM"), | 680 | INST("000000010000----", Id::MOV32_IMM, Type::ArithmeticImmediate, "MOV32_IMM"), |
| 680 | INST("0100110001100---", Id::FMNMX_C, Type::Arithmetic, "FMNMX_C"), | 681 | INST("0100110001100---", Id::FMNMX_C, Type::Arithmetic, "FMNMX_C"), |
| 681 | INST("0101110001100---", Id::FMNMX_R, Type::Arithmetic, "FMNMX_R"), | 682 | INST("0101110001100---", Id::FMNMX_R, Type::Arithmetic, "FMNMX_R"), |
| 682 | INST("0011100-01100---", Id::FMNMX_IMM, Type::Arithmetic, "FMNMX_IMM"), | 683 | INST("0011100-01100---", Id::FMNMX_IMM, Type::Arithmetic, "FMNMX_IMM"), |