i965/fs: Rename the existing pull constant load opcode.
authorEric Anholt <eric@anholt.net>
Wed, 7 Nov 2012 18:42:34 +0000 (10:42 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 5 Dec 2012 00:27:53 +0000 (16:27 -0800)
We're going to use another send message for handling loads with a varying
per-fragment array index.

src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
src/mesa/drivers/dri/i965/brw_fs_emit.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index 6dc470768a2fa42fed33d0ccce481db07409563d..6e4fb134b302d82096cef1e889f37dbdfb31d6c1 100644 (file)
@@ -674,7 +674,7 @@ enum opcode {
    FS_OPCODE_DISCARD,
    FS_OPCODE_SPILL,
    FS_OPCODE_UNSPILL,
-   FS_OPCODE_PULL_CONSTANT_LOAD,
+   FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD,
    FS_OPCODE_MOV_DISPATCH_TO_FLAGS,
 
    VS_OPCODE_URB_WRITE,
index e143e7adbdd23d2abb9131dfb9779889e240b3d9..21473e94c636e90c73961a6788e05d8ecb2c357c 100644 (file)
@@ -515,7 +515,7 @@ fs_visitor::implied_mrf_writes(fs_inst *inst)
       return 1;
    case FS_OPCODE_FB_WRITE:
       return 2;
-   case FS_OPCODE_PULL_CONSTANT_LOAD:
+   case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
    case FS_OPCODE_UNSPILL:
       return 1;
    case FS_OPCODE_SPILL:
@@ -1411,8 +1411,9 @@ fs_visitor::setup_pull_constants()
         fs_reg index = fs_reg((unsigned)SURF_INDEX_FRAG_CONST_BUFFER);
         fs_reg offset = fs_reg((unsigned)(((uniform_nr -
                                             pull_uniform_base) * 4) & ~15));
-        fs_inst *pull = new(mem_ctx) fs_inst(FS_OPCODE_PULL_CONSTANT_LOAD,
-                                             dst, index, offset);
+        fs_inst *pull =
+            new(mem_ctx) fs_inst(FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD,
+                                 dst, index, offset);
         pull->ir = inst->ir;
         pull->annotation = inst->annotation;
         pull->base_mrf = 14;
index 86c33bc8b0f2d1e8fd419a09b4a20d7b6963da9b..c14e779a0ed31d84468a31164d843ac83c719fb0 100644 (file)
@@ -481,9 +481,9 @@ private:
                      bool negate_value);
    void generate_spill(fs_inst *inst, struct brw_reg src);
    void generate_unspill(fs_inst *inst, struct brw_reg dst);
-   void generate_pull_constant_load(fs_inst *inst, struct brw_reg dst,
-                                   struct brw_reg index,
-                                   struct brw_reg offset);
+   void generate_uniform_pull_constant_load(fs_inst *inst, struct brw_reg dst,
+                                            struct brw_reg index,
+                                            struct brw_reg offset);
    void generate_mov_dispatch_to_flags();
 
    struct brw_context *brw;
index dec3dcaef5b7b1fbb1bf59bff07c65030b25a3b3..d296e48c038fbb23fdd27847a64d948f53e7906e 100644 (file)
@@ -336,7 +336,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
          }
          break;
 
-      case FS_OPCODE_PULL_CONSTANT_LOAD:
+      case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
          inst->src[i] = entry->src;
          progress = true;
          break;
index 9a1f360f86a9b288235e19c3d3dde10c2365f67e..87a5e53c3a6fde0a944beeb37606a5738c9117b6 100644 (file)
@@ -608,9 +608,10 @@ fs_generator::generate_unspill(fs_inst *inst, struct brw_reg dst)
 }
 
 void
-fs_generator::generate_pull_constant_load(fs_inst *inst, struct brw_reg dst,
-                                       struct brw_reg index,
-                                       struct brw_reg offset)
+fs_generator::generate_uniform_pull_constant_load(fs_inst *inst,
+                                                  struct brw_reg dst,
+                                                  struct brw_reg index,
+                                                  struct brw_reg offset)
 {
    assert(inst->mlen != 0);
 
@@ -1016,8 +1017,8 @@ fs_generator::generate_code(exec_list *instructions)
         generate_unspill(inst, dst);
         break;
 
-      case FS_OPCODE_PULL_CONSTANT_LOAD:
-        generate_pull_constant_load(inst, dst, src[0], src[1]);
+      case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
+        generate_uniform_pull_constant_load(inst, dst, src[0], src[1]);
         break;
 
       case FS_OPCODE_FB_WRITE:
index 571489c1db803a143699d21dcb5c60283b9e6e5e..7a913534cd4ba56046bbead03b20d1ec93fa2624 100644 (file)
@@ -557,7 +557,7 @@ fs_visitor::visit(ir_expression *ir)
       fs_reg packed_consts = fs_reg(this, glsl_type::float_type);
       packed_consts.type = result.type;
       fs_reg surf_index = fs_reg((unsigned)SURF_INDEX_WM_UBO(uniform_block->value.u[0]));
-      fs_inst *pull = emit(fs_inst(FS_OPCODE_PULL_CONSTANT_LOAD,
+      fs_inst *pull = emit(fs_inst(FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD,
                                    packed_consts,
                                    surf_index,
                                    fs_reg(offset->value.u[0])));