i965/vec4: Plumb log_data through so the backend_shader field gets set.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Jun 2015 04:58:47 +0000 (21:58 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 10 Jul 2015 00:06:16 +0000 (17:06 -0700)
Jason plumbed this through a while back in the FS backend, but
apparently we were just passing NULL in the vec4 backend.

This patch passes brw in as intended.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.h
src/mesa/drivers/dri/i965/gen6_gs_visitor.h

index a5c686ceaaff1666ab786a85abb7aff3db0f28a1..2a565645ce239017d7d3bea1e42f8f2302ff4f6c 100644 (file)
@@ -1940,7 +1940,7 @@ brw_vs_emit(struct brw_context *brw,
    if (!assembly) {
       prog_data->base.dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
 
-      vec4_vs_visitor v(brw->intelScreen->compiler,
+      vec4_vs_visitor v(brw->intelScreen->compiler, brw,
                         c, prog_data, prog, mem_ctx, st_index,
                         !_mesa_is_gles3(&brw->ctx));
       if (!v.run(brw_select_clip_planes(&brw->ctx))) {
index 2ac169321897d4a7a8b5627cd5e5773e8f9c18eb..043557b0c9d6f24b194e999d351ff429e6e52628 100644 (file)
@@ -77,6 +77,7 @@ class vec4_visitor : public backend_shader, public ir_visitor
 {
 public:
    vec4_visitor(const struct brw_compiler *compiler,
+                void *log_data,
                 struct brw_vec4_compile *c,
                 struct gl_program *prog,
                 const struct brw_vue_prog_key *key,
index 69bcf5afc51353374b131b713acc991af2775f7f..80c59aff6ce1b52c60c0a33e5778d7aa8ff489a5 100644 (file)
@@ -35,12 +35,14 @@ const unsigned MAX_GS_INPUT_VERTICES = 6;
 namespace brw {
 
 vec4_gs_visitor::vec4_gs_visitor(const struct brw_compiler *compiler,
+                                 void *log_data,
                                  struct brw_gs_compile *c,
                                  struct gl_shader_program *prog,
                                  void *mem_ctx,
                                  bool no_spills,
                                  int shader_time_index)
-   : vec4_visitor(compiler, &c->base, &c->gp->program.Base, &c->key.base,
+   : vec4_visitor(compiler, log_data,
+                  &c->base, &c->gp->program.Base, &c->key.base,
                   &c->prog_data.base, prog, MESA_SHADER_GEOMETRY, mem_ctx,
                   no_spills, shader_time_index),
      c(c)
@@ -662,7 +664,7 @@ brw_gs_emit(struct brw_context *brw,
           likely(!(INTEL_DEBUG & DEBUG_NO_DUAL_OBJECT_GS))) {
          c->prog_data.base.dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
 
-         vec4_gs_visitor v(brw->intelScreen->compiler,
+         vec4_gs_visitor v(brw->intelScreen->compiler, brw,
                            c, prog, mem_ctx, true /* no_spills */, st_index);
          if (v.run(NULL /* clip planes */)) {
             return generate_assembly(brw, prog, &c->gp->program.Base,
@@ -704,11 +706,11 @@ brw_gs_emit(struct brw_context *brw,
    const unsigned *ret = NULL;
 
    if (brw->gen >= 7)
-      gs = new vec4_gs_visitor(brw->intelScreen->compiler,
+      gs = new vec4_gs_visitor(brw->intelScreen->compiler, brw,
                                c, prog, mem_ctx, false /* no_spills */,
                                st_index);
    else
-      gs = new gen6_gs_visitor(brw->intelScreen->compiler,
+      gs = new gen6_gs_visitor(brw->intelScreen->compiler, brw,
                                c, prog, mem_ctx, false /* no_spills */,
                                st_index);
 
index e693c56b58f5412113075905d1204c0e1e1fba24..e48d8610574055f504e22bbb70e9d63885fd624b 100644 (file)
@@ -69,6 +69,7 @@ class vec4_gs_visitor : public vec4_visitor
 {
 public:
    vec4_gs_visitor(const struct brw_compiler *compiler,
+                   void *log_data,
                    struct brw_gs_compile *c,
                    struct gl_shader_program *prog,
                    void *mem_ctx,
index 8d7a80b19eb43779b6e5aa194abf9b54d8ca8db3..21d9b010b441af9676c7eea9aa53fefc8048bce0 100644 (file)
@@ -3678,6 +3678,7 @@ vec4_visitor::resolve_bool_comparison(ir_rvalue *rvalue, src_reg *reg)
 }
 
 vec4_visitor::vec4_visitor(const struct brw_compiler *compiler,
+                           void *log_data,
                            struct brw_vec4_compile *c,
                            struct gl_program *prog,
                            const struct brw_vue_prog_key *key,
@@ -3687,7 +3688,7 @@ vec4_visitor::vec4_visitor(const struct brw_compiler *compiler,
                           void *mem_ctx,
                            bool no_spills,
                            int shader_time_index)
-   : backend_shader(compiler, NULL, mem_ctx,
+   : backend_shader(compiler, log_data, mem_ctx,
                     shader_prog, prog, &prog_data->base, stage),
      c(c),
      key(key),
index f93062b46d04c33d9ab25983576ec4bd415efdab..eed4d6d5fbc50e3b95d68abc8749e7495344116c 100644 (file)
@@ -212,13 +212,15 @@ vec4_vs_visitor::emit_thread_end()
 
 
 vec4_vs_visitor::vec4_vs_visitor(const struct brw_compiler *compiler,
+                                 void *log_data,
                                  struct brw_vs_compile *vs_compile,
                                  struct brw_vs_prog_data *vs_prog_data,
                                  struct gl_shader_program *prog,
                                  void *mem_ctx,
                                  int shader_time_index,
                                  bool use_legacy_snorm_formula)
-   : vec4_visitor(compiler, &vs_compile->base, &vs_compile->vp->program.Base,
+   : vec4_visitor(compiler, log_data,
+                  &vs_compile->base, &vs_compile->vp->program.Base,
                   &vs_compile->key.base, &vs_prog_data->base, prog,
                   MESA_SHADER_VERTEX,
                   mem_ctx, false /* no_spills */,
index 61f9b006a58e7c73b16074d2a0b324fc3211e7a4..a15cba0b42c27e8a726649667dd0f879e0e7fbe1 100644 (file)
@@ -91,6 +91,7 @@ class vec4_vs_visitor : public vec4_visitor
 {
 public:
    vec4_vs_visitor(const struct brw_compiler *compiler,
+                   void *log_data,
                    struct brw_vs_compile *vs_compile,
                    struct brw_vs_prog_data *vs_prog_data,
                    struct gl_shader_program *prog,
index 27254ebb7279fb7625e2c9c7c91d0b489d2c3842..862d0eaacf06afb2c9fe3534cfc540fb35bbfdda 100644 (file)
@@ -36,12 +36,14 @@ class gen6_gs_visitor : public vec4_gs_visitor
 {
 public:
    gen6_gs_visitor(const struct brw_compiler *comp,
+                   void *log_data,
                    struct brw_gs_compile *c,
                    struct gl_shader_program *prog,
                    void *mem_ctx,
                    bool no_spills,
                    int shader_time_index) :
-      vec4_gs_visitor(comp, c, prog, mem_ctx, no_spills, shader_time_index) {}
+      vec4_gs_visitor(comp, log_data, c, prog, mem_ctx, no_spills,
+                      shader_time_index) {}
 
 protected:
    virtual void assign_binding_table_offsets();