i965: Save the gl_shader_stage enum in backend_visitor.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 22 Jul 2014 03:05:21 +0000 (20:05 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Jul 2014 22:44:14 +0000 (15:44 -0700)
This will be useful for INTEL_DEBUG=optimizer in the vec4 backend, which
needs to know whether it's currently processing a VS or GS.  It isn't
worth adding virtual methods for this case.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_shader.h

index 072a661ef83ca3fbd55be3a68aac11c540ff3367..f56ea68756b4ee044b2c5b2b20851b21aca0a89d 100644 (file)
@@ -550,7 +550,8 @@ backend_visitor::backend_visitor(struct brw_context *brw,
      shader_prog(shader_prog),
      prog(prog),
      stage_prog_data(stage_prog_data),
-     cfg(NULL)
+     cfg(NULL),
+     stage(stage)
 {
 }
 
index 1c5f41eeb3a0076f41b3235199c874bd6e279cd6..5c48671ff6d45c1b50d54fbd10e59d5771c24da5 100644 (file)
@@ -162,6 +162,8 @@ public:
 
    cfg_t *cfg;
 
+   gl_shader_stage stage;
+
    virtual void dump_instruction(backend_instruction *inst) = 0;
    virtual void dump_instruction(backend_instruction *inst, FILE *file) = 0;
    virtual void dump_instructions();