[Mesa-dev] [PATCH v3 09/12] i965: Rename brw_vec4_prog_data/key to brw_bue_prog_data/key

Kristian Høgsberg krh at bitplanet.net
Thu Dec 4 22:02:30 PST 2014


These structs aren't vec4 specific, they are shared by shader stages
operating on Vertex URB Entries (VUEs).  VUEs are the data structures in
the URB that hold vertex data between the pipeline geometry stages.
Using vue in the name instead of vec4 makes a lot more sense, especially
when we add scalar vertex shader support.

Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
---
 src/mesa/drivers/dri/i965/brw_context.h           | 16 ++++++++--------
 src/mesa/drivers/dri/i965/brw_gs.c                |  6 +++---
 src/mesa/drivers/dri/i965/brw_program.h           |  6 +++---
 src/mesa/drivers/dri/i965/brw_vec4.cpp            |  6 +++---
 src/mesa/drivers/dri/i965/brw_vec4.h              | 20 ++++++++++----------
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp  |  4 ++--
 src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp |  2 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp    |  4 ++--
 src/mesa/drivers/dri/i965/brw_vs.c                | 12 ++++++------
 src/mesa/drivers/dri/i965/gen6_gs_state.c         |  2 +-
 src/mesa/drivers/dri/i965/gen7_gs_state.c         |  2 +-
 src/mesa/drivers/dri/i965/gen8_gs_state.c         |  2 +-
 src/mesa/drivers/dri/i965/gen8_vs_state.c         |  2 +-
 13 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 7a6ec2f..c3b9013 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -145,7 +145,7 @@ extern "C" {
 struct brw_context;
 struct brw_inst;
 struct brw_vs_prog_key;
-struct brw_vec4_prog_key;
+struct brw_vue_prog_key;
 struct brw_wm_prog_key;
 struct brw_wm_prog_data;
 
@@ -580,10 +580,10 @@ struct brw_ff_gs_prog_data {
 };
 
 
-/* Note: brw_vec4_prog_data_compare() must be updated when adding fields to
+/* Note: brw_vue_prog_data_compare() must be updated when adding fields to
  * this struct!
  */
-struct brw_vec4_prog_data {
+struct brw_vue_prog_data {
    struct brw_stage_prog_data base;
    struct brw_vue_map vue_map;
 
@@ -604,7 +604,7 @@ struct brw_vec4_prog_data {
  * struct!
  */
 struct brw_vs_prog_data {
-   struct brw_vec4_prog_data base;
+   struct brw_vue_prog_data base;
 
    GLbitfield64 inputs_read;
 
@@ -662,7 +662,7 @@ struct brw_vs_prog_data {
  */
 struct brw_gs_prog_data
 {
-   struct brw_vec4_prog_data base;
+   struct brw_vue_prog_data base;
 
    /**
     * Size of an output vertex, measured in HWORDS (32 bytes).
@@ -1872,9 +1872,9 @@ void gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
 uint32_t get_hw_prim_for_gl_prim(int mode);
 
 void
-brw_setup_vec4_key_clip_info(struct brw_context *brw,
-                             struct brw_vec4_prog_key *key,
-                             bool program_uses_clip_distance);
+brw_setup_vue_key_clip_info(struct brw_context *brw,
+                            struct brw_vue_prog_key *key,
+                            bool program_uses_clip_distance);
 
 void
 gen6_upload_push_constants(struct brw_context *brw,
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index a964951..c7ebe5f 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -330,8 +330,8 @@ brw_upload_gs_prog(struct brw_context *brw)
    memset(&key, 0, sizeof(key));
 
    key.base.program_string_id = gp->id;
-   brw_setup_vec4_key_clip_info(brw, &key.base,
-                                gp->program.Base.UsesClipDistanceOut);
+   brw_setup_vue_key_clip_info(brw, &key.base,
+                               gp->program.Base.UsesClipDistanceOut);
 
    /* _NEW_TEXTURE */
    brw_populate_sampler_prog_key_data(ctx, prog, stage_state->sampler_count,
@@ -386,7 +386,7 @@ brw_gs_precompile(struct gl_context *ctx,
 
    memset(&key, 0, sizeof(key));
 
-   brw_vec4_setup_prog_key_for_precompile(ctx, &key.base, bgp->id, &gp->Base);
+   brw_vue_setup_prog_key_for_precompile(ctx, &key.base, bgp->id, &gp->Base);
 
    /* Assume that the set of varyings coming in from the vertex shader exactly
     * matches what the geometry shader requires.
diff --git a/src/mesa/drivers/dri/i965/brw_program.h b/src/mesa/drivers/dri/i965/brw_program.h
index 808fe80..eaa7e4e 100644
--- a/src/mesa/drivers/dri/i965/brw_program.h
+++ b/src/mesa/drivers/dri/i965/brw_program.h
@@ -78,7 +78,7 @@ struct brw_sampler_prog_key_data {
 };
 
 
-struct brw_vec4_prog_key {
+struct brw_vue_prog_key {
    unsigned program_string_id;
 
    /**
@@ -98,7 +98,7 @@ struct brw_vec4_prog_key {
 
 /** The program key for Vertex Shaders. */
 struct brw_vs_prog_key {
-   struct brw_vec4_prog_key base;
+   struct brw_vue_prog_key base;
 
    /*
     * Per-attribute workaround flags
@@ -123,7 +123,7 @@ struct brw_vs_prog_key {
 /** The program key for Geometry Shaders. */
 struct brw_gs_prog_key
 {
-   struct brw_vec4_prog_key base;
+   struct brw_vue_prog_key base;
 
    uint64_t input_varyings;
 };
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 18a3369..71b396a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1808,9 +1808,9 @@ brw_vs_emit(struct brw_context *brw,
 
 
 void
-brw_vec4_setup_prog_key_for_precompile(struct gl_context *ctx,
-                                       struct brw_vec4_prog_key *key,
-                                       GLuint id, struct gl_program *prog)
+brw_vue_setup_prog_key_for_precompile(struct gl_context *ctx,
+                                      struct brw_vue_prog_key *key,
+                                      GLuint id, struct gl_program *prog)
 {
    key->program_string_id = id;
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index d94c323..5bd3e23 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -54,9 +54,9 @@ extern "C" {
 #endif
 
 void
-brw_vec4_setup_prog_key_for_precompile(struct gl_context *ctx,
-                                       struct brw_vec4_prog_key *key,
-                                       GLuint id, struct gl_program *prog);
+brw_vue_setup_prog_key_for_precompile(struct gl_context *ctx,
+                                      struct brw_vue_prog_key *key,
+                                      GLuint id, struct gl_program *prog);
 
 #ifdef __cplusplus
 } /* extern "C" */
@@ -191,7 +191,7 @@ public:
                     const src_reg &src2 = src_reg());
 
    struct brw_reg get_dst(void);
-   struct brw_reg get_src(const struct brw_vec4_prog_data *prog_data, int i);
+   struct brw_reg get_src(const struct brw_vue_prog_data *prog_data, int i);
 
    dst_reg dst;
    src_reg src[3];
@@ -232,8 +232,8 @@ public:
    vec4_visitor(struct brw_context *brw,
                 struct brw_vec4_compile *c,
                 struct gl_program *prog,
-                const struct brw_vec4_prog_key *key,
-                struct brw_vec4_prog_data *prog_data,
+                const struct brw_vue_prog_key *key,
+                struct brw_vue_prog_data *prog_data,
 		struct gl_shader_program *shader_prog,
                 gl_shader_stage stage,
 		void *mem_ctx,
@@ -260,8 +260,8 @@ public:
    }
 
    struct brw_vec4_compile * const c;
-   const struct brw_vec4_prog_key * const key;
-   struct brw_vec4_prog_data * const prog_data;
+   const struct brw_vue_prog_key * const key;
+   struct brw_vue_prog_data * const prog_data;
    unsigned int sanity_param_count;
 
    char *fail_msg;
@@ -586,7 +586,7 @@ public:
    vec4_generator(struct brw_context *brw,
                   struct gl_shader_program *shader_prog,
                   struct gl_program *prog,
-                  struct brw_vec4_prog_data *prog_data,
+                  struct brw_vue_prog_data *prog_data,
                   void *mem_ctx,
                   bool debug_flag);
    ~vec4_generator();
@@ -678,7 +678,7 @@ private:
    struct gl_shader_program *shader_prog;
    const struct gl_program *prog;
 
-   struct brw_vec4_prog_data *prog_data;
+   struct brw_vue_prog_data *prog_data;
 
    void *mem_ctx;
    const bool debug_flag;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index b353539..c9942c6 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -66,7 +66,7 @@ vec4_instruction::get_dst(void)
 }
 
 struct brw_reg
-vec4_instruction::get_src(const struct brw_vec4_prog_data *prog_data, int i)
+vec4_instruction::get_src(const struct brw_vue_prog_data *prog_data, int i)
 {
    struct brw_reg brw_reg;
 
@@ -136,7 +136,7 @@ vec4_instruction::get_src(const struct brw_vec4_prog_data *prog_data, int i)
 vec4_generator::vec4_generator(struct brw_context *brw,
                                struct gl_shader_program *shader_prog,
                                struct gl_program *prog,
-                               struct brw_vec4_prog_data *prog_data,
+                               struct brw_vue_prog_data *prog_data,
                                void *mem_ctx,
                                bool debug_flag)
    : brw(brw), shader_prog(shader_prog), prog(prog), prog_data(prog_data),
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index db0e6cc..089f479 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -611,7 +611,7 @@ static const unsigned *
 generate_assembly(struct brw_context *brw,
                   struct gl_shader_program *shader_prog,
                   struct gl_program *prog,
-                  struct brw_vec4_prog_data *prog_data,
+                  struct brw_vue_prog_data *prog_data,
                   void *mem_ctx,
                   const cfg_t *cfg,
                   unsigned *final_assembly_size)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index ded7b8c..5cf252a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -3538,8 +3538,8 @@ vec4_visitor::resolve_ud_negate(src_reg *reg)
 vec4_visitor::vec4_visitor(struct brw_context *brw,
                            struct brw_vec4_compile *c,
                            struct gl_program *prog,
-                           const struct brw_vec4_prog_key *key,
-                           struct brw_vec4_prog_data *prog_data,
+                           const struct brw_vue_prog_key *key,
+                           struct brw_vue_prog_data *prog_data,
 			   struct gl_shader_program *shader_prog,
                            gl_shader_stage stage,
 			   void *mem_ctx,
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index cc2af35..2d56b74 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -396,9 +396,9 @@ brw_vs_debug_recompile(struct brw_context *brw,
 
 
 void
-brw_setup_vec4_key_clip_info(struct brw_context *brw,
-                             struct brw_vec4_prog_key *key,
-                             bool program_uses_clip_distance)
+brw_setup_vue_key_clip_info(struct brw_context *brw,
+                            struct brw_vue_prog_key *key,
+                            bool program_uses_clip_distance)
 {
    struct gl_context *ctx = &brw->ctx;
 
@@ -426,8 +426,8 @@ static void brw_upload_vs_prog(struct brw_context *brw)
     * the inputs it asks for, whether they are varying or not.
     */
    key.base.program_string_id = vp->id;
-   brw_setup_vec4_key_clip_info(brw, &key.base,
-                                vp->program.Base.UsesClipDistanceOut);
+   brw_setup_vue_key_clip_info(brw, &key.base,
+                               vp->program.Base.UsesClipDistanceOut);
 
    /* _NEW_POLYGON */
    if (brw->gen < 6) {
@@ -514,7 +514,7 @@ brw_vs_precompile(struct gl_context *ctx,
 
    memset(&key, 0, sizeof(key));
 
-   brw_vec4_setup_prog_key_for_precompile(ctx, &key.base, bvp->id, &vp->Base);
+   brw_vue_setup_prog_key_for_precompile(ctx, &key.base, bvp->id, &vp->Base);
    key.clamp_vertex_color =
       (prog->OutputsWritten & (VARYING_BIT_COL0 | VARYING_BIT_COL1 |
                                VARYING_BIT_BFC0 | VARYING_BIT_BFC1));
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_state.c b/src/mesa/drivers/dri/i965/gen6_gs_state.c
index 35f5be7..eb4c586 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_gs_state.c
@@ -91,7 +91,7 @@ upload_gs_state(struct brw_context *brw)
    /* BRW_NEW_GEOMETRY_PROGRAM */
    bool active = brw->geometry_program;
    /* BRW_NEW_GS_PROG_DATA */
-   const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
+   const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
    const struct brw_stage_state *stage_state = &brw->gs.base;
 
    if (!active || stage_state->push_const_size == 0) {
diff --git a/src/mesa/drivers/dri/i965/gen7_gs_state.c b/src/mesa/drivers/dri/i965/gen7_gs_state.c
index 0f49139..e1c4f8b 100644
--- a/src/mesa/drivers/dri/i965/gen7_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_gs_state.c
@@ -35,7 +35,7 @@ upload_gs_state(struct brw_context *brw)
    /* BRW_NEW_GEOMETRY_PROGRAM */
    bool active = brw->geometry_program;
    /* BRW_NEW_GS_PROG_DATA */
-   const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
+   const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
 
    /**
     * From Graphics BSpec: 3D-Media-GPGPU Engine > 3D Pipeline Stages >
diff --git a/src/mesa/drivers/dri/i965/gen8_gs_state.c b/src/mesa/drivers/dri/i965/gen8_gs_state.c
index 526a826..8759a91 100644
--- a/src/mesa/drivers/dri/i965/gen8_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_gs_state.c
@@ -34,7 +34,7 @@ gen8_upload_gs_state(struct brw_context *brw)
    /* BRW_NEW_GEOMETRY_PROGRAM */
    bool active = brw->geometry_program;
    /* BRW_NEW_GS_PROG_DATA */
-   const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
+   const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
 
    if (active) {
       int urb_entry_write_offset = 1;
diff --git a/src/mesa/drivers/dri/i965/gen8_vs_state.c b/src/mesa/drivers/dri/i965/gen8_vs_state.c
index b0444e0..f92af55 100644
--- a/src/mesa/drivers/dri/i965/gen8_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_vs_state.c
@@ -37,7 +37,7 @@ upload_vs_state(struct brw_context *brw)
    uint32_t floating_point_mode = 0;
 
    /* BRW_NEW_VS_PROG_DATA */
-   const struct brw_vec4_prog_data *prog_data = &brw->vs.prog_data->base;
+   const struct brw_vue_prog_data *prog_data = &brw->vs.prog_data->base;
 
    if (prog_data->base.use_alt_mode)
       floating_point_mode = GEN6_VS_FLOATING_POINT_MODE_ALT;
-- 
2.2.0



More information about the mesa-dev mailing list