i965: Rename brw_vec4_prog_data/key to brw_bue_prog_data/key
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 25 Nov 2014 22:29:48 +0000 (14:29 -0800)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 10 Dec 2014 20:29:16 +0000 (12:29 -0800)
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@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 files changed:
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_program.h
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/gen6_gs_state.c
src/mesa/drivers/dri/i965/gen7_gs_state.c
src/mesa/drivers/dri/i965/gen8_gs_state.c
src/mesa/drivers/dri/i965/gen8_vs_state.c

index 7a6ec2fda944a65e40048b261c8a8ddc366b04a3..c3b90133849a1ad852aeb1e38c85900cd9f4fbdc 100644 (file)
@@ -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,
index a9649516bf7d50da71dcf42da97cacc7bc35fc55..c7ebe5f89f80194f7fe348d611e9036b21a5c64b 100644 (file)
@@ -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.
index 808fe80f4067a5b6bc865b3e7c819dd78f0a12ec..eaa7e4e9a79870ff9722aec773b10b9661c04463 100644 (file)
@@ -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;
 };
index d02681069ad91e41d0cca29088d4fee59153c3c2..6d5443b58c14ff14aec94cec89c39ea77f844e1c 100644 (file)
@@ -1815,9 +1815,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;
 
index 527002723c8144667e36d00853388f97ec1c8d31..be52fbc54b97153f88fbef347a4001d7e986b97f 100644 (file)
@@ -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;
@@ -587,7 +587,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();
@@ -679,7 +679,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;
index 8d74ec7d887401a83316c3c8108e89b7d35c8ec0..b88a57912cb501db94849f3dfe78d9d361758fff 100644 (file)
@@ -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),
index db0e6cc42641fcd8a9df443944c57da3cbe193b8..089f479cedec6c7ca7340df392478aa5789339ed 100644 (file)
@@ -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)
index 73fff751dfbd8c78484a61432381a981846dbeda..723878888af8c243a58bcbf68c2113c3982b2a0a 100644 (file)
@@ -3568,8 +3568,8 @@ vec4_visitor::resolve_bool_comparison(ir_rvalue *rvalue, 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,
index cc2af35ab503679bfc80203b00117fbd15fd2789..2d56b749ea3caba8ac97e14caed1dc77709eae09 100644 (file)
@@ -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));
index 35f5be787bdcbcd826b396d4527a99a72418f492..eb4c58601f885f8cab772eebea104d8ebebde652 100644 (file)
@@ -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) {
index 0f491393e41fd51884fa0f0cf6b196eed313d500..e1c4f8b5d14faf8322f5e590ecd98f9c390cfd00 100644 (file)
@@ -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 >
index efe490ca206fe26955df2e63dcc46e866e8f523a..95cc1234fe5d21a433af3264cf514a0bf7c51e62 100644 (file)
@@ -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;
index b0444e057f16cd4e8c8eaa1f2b4f8c6b02513f02..f92af55e37f38515430789151709d5a28312fa4f 100644 (file)
@@ -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;