i965/fs: Add stage variable to fs_generator
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 3 Sep 2014 05:50:44 +0000 (22:50 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Sat, 6 Sep 2014 05:15:06 +0000 (22:15 -0700)
This will allow for stage specific code paths.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 506f3ad4b392d5a9632c038cf19a72f3f3e27d61..846efc7d3c09f3df0efaca5de65e62fdce5e90b9 100644 (file)
@@ -679,6 +679,7 @@ private:
    struct gl_context *ctx;
 
    struct brw_compile *p;
+   gl_shader_stage stage;
    const struct brw_wm_prog_key *const key;
    struct brw_wm_prog_data *prog_data;
 
index d860700d6d860fbe82372b617bfb395c847d00b3..558e4931b1035519a4f7b5890c4de0749ca9816a 100644 (file)
@@ -45,9 +45,10 @@ fs_generator::fs_generator(struct brw_context *brw,
                            bool runtime_check_aads_emit,
                            bool debug_flag)
 
-   : brw(brw), key(key), prog_data(prog_data), prog(prog), fp(fp),
-     runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(debug_flag),
-     mem_ctx(mem_ctx)
+   : brw(brw), stage(MESA_SHADER_FRAGMENT), key(key),
+     prog_data(prog_data), prog(prog), fp(fp),
+     runtime_check_aads_emit(runtime_check_aads_emit),
+     debug_flag(debug_flag), mem_ctx(mem_ctx)
 {
    ctx = &brw->ctx;