i965/vs: Plumb brw_vec4_prog_data into vec4_generator().
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 15 Aug 2013 03:42:29 +0000 (20:42 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Aug 2013 20:17:00 +0000 (13:17 -0700)
This will be useful for the next commit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp

index 535eca48e7d23c77a6ade61f343c62f08f62f302..429e8cc9fd7a85c037fcc6d37355a2c8ea2d0e2e 100644 (file)
@@ -1542,7 +1542,7 @@ brw_vs_emit(struct brw_context *brw,
       return NULL;
    }
 
-   vec4_generator g(brw, prog, &c->vp->program.Base, mem_ctx,
+   vec4_generator g(brw, prog, &c->vp->program.Base, &prog_data->base, mem_ctx,
                     INTEL_DEBUG & DEBUG_VS);
    const unsigned *generated =g.generate_assembly(&v.instructions,
                                                   final_assembly_size);
index 8986648793a1247f9998b3edf68f36c701f4f91b..833bef17d0e2ceecde709e295cc9029f4804dd5e 100644 (file)
@@ -539,6 +539,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,
                   void *mem_ctx,
                   bool debug_flag);
    ~vec4_generator();
@@ -604,6 +605,8 @@ private:
    struct gl_shader *shader;
    const struct gl_program *prog;
 
+   struct brw_vec4_prog_data *prog_data;
+
    void *mem_ctx;
    const bool debug_flag;
 };
index 6ebc318a13d11db1fabb893276ee8557e0300037..5417c82dbb2c25f23a4f8fc7221e773ee78bbdad 100644 (file)
@@ -135,10 +135,11 @@ vec4_instruction::get_src(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,
                                void *mem_ctx,
                                bool debug_flag)
-   : brw(brw), shader_prog(shader_prog), prog(prog), mem_ctx(mem_ctx),
-     debug_flag(debug_flag)
+   : brw(brw), shader_prog(shader_prog), prog(prog), prog_data(prog_data),
+     mem_ctx(mem_ctx), debug_flag(debug_flag)
 {
    shader = shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_VERTEX] : NULL;