i965/fs: Rename Gen4 physical varying pull constant load opcode.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 20 May 2016 20:03:31 +0000 (13:03 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 28 May 2016 06:19:21 +0000 (23:19 -0700)
For consistency with the Gen7 variant.  I'm not doing the same to the
uniform pull constant message at this point because the non-GEN7 one
is still overloaded to be either an expression-like logical
instruction or a Gen4-specific physical send message.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
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_generator.cpp
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp

index 432a1aec0dfd0c6fb89704cfb8d2cf6b3ffffc51..4089ab6f56a167e291b21372ed1f3b544ef00c75 100644 (file)
@@ -1114,7 +1114,7 @@ enum opcode {
    FS_OPCODE_PIXEL_Y,
    FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD,
    FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GEN7,
-   FS_OPCODE_VARYING_PULL_CONSTANT_LOAD,
+   FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4,
    FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7,
    FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_LOGICAL,
    FS_OPCODE_GET_BUFFER_SIZE,
index 6e2b71650c385ec4f40befc8ccc1816ba70f0cd9..d7ae90a8f046cce15e7a3d91e7b8e5c3dca424f6 100644 (file)
@@ -971,7 +971,7 @@ fs_visitor::implied_mrf_writes(fs_inst *inst)
    case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
    case SHADER_OPCODE_GEN4_SCRATCH_READ:
       return 1;
-   case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD:
+   case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4:
       return inst->mlen;
    case SHADER_OPCODE_GEN4_SCRATCH_WRITE:
       return inst->mlen;
@@ -4426,7 +4426,7 @@ lower_varying_pull_constant_logical_send(const fs_builder &bld, fs_inst *inst)
 
       bld.MOV(byte_offset(payload, REG_SIZE), inst->src[1]);
 
-      inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD;
+      inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4;
       inst->resize_sources(1);
       inst->base_mrf = payload.nr;
       inst->header_size = 1;
index 75759b7ba26435b01afa8654054e15268422ea6f..9415af23c8d4a6fc38e1a90f077fcedf100d93d7 100644 (file)
@@ -463,9 +463,9 @@ private:
                                                  struct brw_reg dst,
                                                  struct brw_reg surf_index,
                                                  struct brw_reg offset);
-   void generate_varying_pull_constant_load(fs_inst *inst,
-                                            struct brw_reg dst,
-                                            struct brw_reg index);
+   void generate_varying_pull_constant_load_gen4(fs_inst *inst,
+                                                 struct brw_reg dst,
+                                                 struct brw_reg index);
    void generate_varying_pull_constant_load_gen7(fs_inst *inst,
                                                  struct brw_reg dst,
                                                  struct brw_reg index,
index d979518c9225c8368c3bf10d585d5bf723233039..5ca32b047e41d9fe06d4a1eac8e13ad0ccfe4b12 100644 (file)
@@ -1345,9 +1345,9 @@ fs_generator::generate_uniform_pull_constant_load_gen7(fs_inst *inst,
 }
 
 void
-fs_generator::generate_varying_pull_constant_load(fs_inst *inst,
-                                                  struct brw_reg dst,
-                                                  struct brw_reg index)
+fs_generator::generate_varying_pull_constant_load_gen4(fs_inst *inst,
+                                                       struct brw_reg dst,
+                                                       struct brw_reg index)
 {
    assert(devinfo->gen < 7); /* Should use the gen7 variant. */
    assert(inst->header_size != 0);
@@ -2180,8 +2180,8 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
         generate_uniform_pull_constant_load_gen7(inst, dst, src[0], src[1]);
         break;
 
-      case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD:
-        generate_varying_pull_constant_load(inst, dst, src[0]);
+      case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4:
+        generate_varying_pull_constant_load_gen4(inst, dst, src[0]);
         break;
 
       case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7:
index 264e9efad777852ad567d3501a33d388bae9744a..4011e0f3538423c4d56b37d375ea4cc633e51242 100644 (file)
@@ -296,7 +296,7 @@ schedule_node::set_latency_gen7(bool is_haswell)
       latency = 100;
       break;
 
-   case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD:
+   case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4:
    case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
    case VS_OPCODE_PULL_CONSTANT_LOAD:
       /* testing using varying-index pull constants:
index 551d9c2392631e03bed342948effb9cf2d662d61..426deb0ef891d752d814a217fc6215027d07b47a 100644 (file)
@@ -344,8 +344,8 @@ brw_instruction_name(const struct brw_device_info *devinfo, enum opcode op)
       return "uniform_pull_const";
    case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GEN7:
       return "uniform_pull_const_gen7";
-   case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD:
-      return "varying_pull_const";
+   case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN4:
+      return "varying_pull_const_gen4";
    case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7:
       return "varying_pull_const_gen7";
    case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_LOGICAL: