d3d1x: add FORK/JOIN phase opcodes to declarations
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Wed, 12 Oct 2011 16:04:50 +0000 (18:04 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 21 Oct 2011 21:00:36 +0000 (23:00 +0200)
The phase instance counts are not necessarily redeclared so with
the separation of declarations and instructions we wouldn't know
which instance count applies to which phase.

src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_parse.cpp

index f406b1f8dca0ba30bb758a158c16f54f6da7be48..9d7392b9a2c3d88984db54109da57e6eab4c0cd0 100644 (file)
@@ -202,6 +202,15 @@ relative:
                                continue;
                        }
 
+                       if(opcode == SM4_OPCODE_HS_FORK_PHASE || opcode == SM4_OPCODE_HS_JOIN_PHASE)
+                       {
+                               // need to interleave these with the declarations or we cannot
+                               // assign fork/join phase instance counts to phases
+                               sm4_dcl& dcl = *new sm4_dcl;
+                               program.dcls.push_back(&dcl);
+                               dcl.opcode = opcode;
+                       }
+
                        if((opcode >= SM4_OPCODE_DCL_RESOURCE && opcode <= SM4_OPCODE_DCL_GLOBAL_FLAGS)
                                || (opcode >= SM4_OPCODE_DCL_STREAM && opcode <= SM4_OPCODE_DCL_RESOURCE_STRUCTURED))
                        {