[Mesa-dev] [PATCH 01/21] i965: Rename setup_vector_uniform_values to setup_vec4_uniform_value

Jason Ekstrand jason at jlekstrand.net
Wed Aug 19 22:45:36 PDT 2015


The new name more accurately represents what it does: Set up a single vec4
uniform value.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp           |  3 ++-
 src/mesa/drivers/dri/i965/brw_fs.h             |  4 ++--
 src/mesa/drivers/dri/i965/brw_shader.cpp       | 12 ++++++------
 src/mesa/drivers/dri/i965/brw_shader.h         |  4 ++--
 src/mesa/drivers/dri/i965/brw_vec4.h           |  4 ++--
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |  8 ++++----
 6 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 82cb499..47cc167 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -943,7 +943,8 @@ fs_visitor::import_uniforms(fs_visitor *v)
 }
 
 void
-fs_visitor::setup_vector_uniform_values(const gl_constant_value *values, unsigned n)
+fs_visitor::setup_vec4_uniform_value(const gl_constant_value *values,
+                                     unsigned n)
 {
    static const gl_constant_value zero = { 0 };
 
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 975183e..1a56c2a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -291,8 +291,8 @@ public:
 
    struct brw_reg interp_reg(int location, int channel);
 
-   virtual void setup_vector_uniform_values(const gl_constant_value *values,
-                                            unsigned n);
+   virtual void setup_vec4_uniform_value(const gl_constant_value *values,
+                                         unsigned n);
 
    int implied_mrf_writes(fs_inst *inst);
 
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 6b92806..48fbe8f 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -1431,17 +1431,17 @@ backend_shader::setup_image_uniform_values(const gl_uniform_storage *storage)
       /* Upload the brw_image_param structure.  The order is expected to match
        * the BRW_IMAGE_PARAM_*_OFFSET defines.
        */
-      setup_vector_uniform_values(
+      setup_vec4_uniform_value(
          (const gl_constant_value *)&param->surface_idx, 1);
-      setup_vector_uniform_values(
+      setup_vec4_uniform_value(
          (const gl_constant_value *)param->offset, 2);
-      setup_vector_uniform_values(
+      setup_vec4_uniform_value(
          (const gl_constant_value *)param->size, 3);
-      setup_vector_uniform_values(
+      setup_vec4_uniform_value(
          (const gl_constant_value *)param->stride, 4);
-      setup_vector_uniform_values(
+      setup_vec4_uniform_value(
          (const gl_constant_value *)param->tiling, 3);
-      setup_vector_uniform_values(
+      setup_vec4_uniform_value(
          (const gl_constant_value *)param->swizzling, 2);
 
       brw_mark_surface_used(
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index 2cc97f2..933869a 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -270,8 +270,8 @@ public:
 
    virtual void invalidate_live_intervals() = 0;
 
-   virtual void setup_vector_uniform_values(const gl_constant_value *values,
-                                            unsigned n) = 0;
+   virtual void setup_vec4_uniform_value(const gl_constant_value *values,
+                                         unsigned n) = 0;
    void setup_image_uniform_values(const gl_uniform_storage *storage);
 };
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 341c516..f8f31fc 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -177,8 +177,8 @@ public:
    void fail(const char *msg, ...);
 
    void setup_uniform_clipplane_values(gl_clip_plane *clip_planes);
-   virtual void setup_vector_uniform_values(const gl_constant_value *values,
-                                            unsigned n);
+   virtual void setup_vec4_uniform_value(const gl_constant_value *values,
+                                         unsigned n);
    void setup_uniform_values(ir_variable *ir);
    void setup_builtin_uniform_values(ir_variable *ir);
    int setup_uniforms(int payload_reg);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 9062bcc..64d4abe 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -696,8 +696,8 @@ dst_reg::dst_reg(class vec4_visitor *v, const struct glsl_type *type)
 }
 
 void
-vec4_visitor::setup_vector_uniform_values(const gl_constant_value *values,
-                                          unsigned n)
+vec4_visitor::setup_vec4_uniform_value(const gl_constant_value *values,
+                                       unsigned n)
 {
    static const gl_constant_value zero = { 0 };
 
@@ -744,8 +744,8 @@ vec4_visitor::setup_uniform_values(ir_variable *ir)
       const unsigned vector_size = storage->type->vector_elements;
 
       for (unsigned s = 0; s < vector_count; s++)
-         setup_vector_uniform_values(&storage->storage[s * vector_size],
-                                     vector_size);
+         setup_vec4_uniform_value(&storage->storage[s * vector_size],
+                                  vector_size);
    }
 }
 
-- 
2.4.3



More information about the mesa-dev mailing list