Explorar el Código

Merge pull request #2737 from FernandoS27/track-fix

Shader_Ir: Correct tracking to track from right to left
bunnei hace 7 años
padre
commit
4d26550f5f
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/video_core/shader/track.cpp

+ 2 - 2
src/video_core/shader/track.cpp

@@ -59,8 +59,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co
         return TrackCbuf(source, code, new_cursor);
     }
     if (const auto operation = std::get_if<OperationNode>(&*tracked)) {
-        for (std::size_t i = 0; i < operation->GetOperandsCount(); ++i) {
-            if (auto found = TrackCbuf((*operation)[i], code, cursor); std::get<0>(found)) {
+        for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) {
+            if (auto found = TrackCbuf((*operation)[i - 1], code, cursor); std::get<0>(found)) {
                 // Cbuf found in operand.
                 return found;
             }