Mesa (master): i965/fs: Rename the existing pull constant load opcode.

Eric Anholt anholt at kemper.freedesktop.org
Wed Dec 5 01:13:09 UTC 2012


Module: Mesa
Branch: master
Commit: 29340d02dc38a9cc352d44412871dc9d4e3f878a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=29340d02dc38a9cc352d44412871dc9d4e3f878a

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Nov  7 10:42:34 2012 -0800

i965/fs: Rename the existing pull constant load opcode.

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            |    2 +-
 src/mesa/drivers/dri/i965/brw_fs.cpp               |    7 ++++---
 src/mesa/drivers/dri/i965/brw_fs.h                 |    6 +++---
 .../drivers/dri/i965/brw_fs_copy_propagation.cpp   |    2 +-
 src/mesa/drivers/dri/i965/brw_fs_emit.cpp          |   11 ++++++-----
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp       |    2 +-
 6 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 6dc4707..6e4fb13 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index e143e7a..21473e9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 86c33bc..c14e779 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index dec3dca..d296e48 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index 9a1f360..87a5e53 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -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:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 571489c..7a91353 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -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])));




More information about the mesa-commit mailing list