[Mesa-dev] [PATCH v2 13/19] i965/vs: Rename vec4_generator::prog to shader_prog.

Paul Berry stereotype441 at gmail.com
Tue Apr 9 15:11:16 PDT 2013


The next patch is going to change the type of vec4_generator::vp from
struct gl_vertex_program * to struct gl_program *, and rename it.  The
sensible name to change it to is vec4_generator::prog.  However, prog
is already used.  Since the existing vec4_generator::prog is of type
struct gl_shader_program, it makes sense to rename it to shader_prog.
---
 src/mesa/drivers/dri/i965/brw_vec4.h        | 4 ++--
 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 08a6654..dca6a55 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -524,7 +524,7 @@ class vec4_generator
 public:
    vec4_generator(struct brw_context *brw,
                   struct brw_vs_compile *c,
-                  struct gl_shader_program *prog,
+                  struct gl_shader_program *shader_prog,
                   void *mem_ctx);
    ~vec4_generator();
 
@@ -581,7 +581,7 @@ private:
    struct brw_compile *p;
    struct brw_vs_compile *c;
 
-   struct gl_shader_program *prog;
+   struct gl_shader_program *shader_prog;
    struct gl_shader *shader;
    const struct gl_vertex_program *vp;
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index e378f7f..1c99d6a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -134,14 +134,14 @@ vec4_instruction::get_src(int i)
 
 vec4_generator::vec4_generator(struct brw_context *brw,
                                struct brw_vs_compile *c,
-                               struct gl_shader_program *prog,
+                               struct gl_shader_program *shader_prog,
                                void *mem_ctx)
-   : brw(brw), c(c), prog(prog), mem_ctx(mem_ctx)
+   : brw(brw), c(c), shader_prog(shader_prog), mem_ctx(mem_ctx)
 {
    intel = &brw->intel;
    vp = &c->vp->program;
 
-   shader = prog ? prog->_LinkedShaders[MESA_SHADER_VERTEX] : NULL;
+   shader = shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_VERTEX] : NULL;
 
    p = rzalloc(mem_ctx, struct brw_compile);
    brw_init_compile(brw, p, mem_ctx);
@@ -697,7 +697,7 @@ vec4_generator::generate_code(exec_list *instructions)
 
    if (unlikely(INTEL_DEBUG & DEBUG_VS)) {
       if (shader) {
-         printf("Native code for vertex shader %d:\n", prog->Name);
+         printf("Native code for vertex shader %d:\n", shader_prog->Name);
       } else {
          printf("Native code for vertex program %d:\n", c->vp->program.Base.Id);
       }
-- 
1.8.2.1



More information about the mesa-dev mailing list