diff options
author | Paul Berry <stereotype441@gmail.com> | 2014-01-22 11:45:39 -0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2014-01-23 13:40:55 -0800 |
commit | 9cee3ff562f3e4b51bfd30338fd1ba7716ac5737 (patch) | |
tree | 4cdb18527abf58071fe5b17053eb35a63bdc45e1 /src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | |
parent | 00c672086c31f94dd96609fa976300781f53792e (diff) | |
download | external_mesa3d-9cee3ff562f3e4b51bfd30338fd1ba7716ac5737.zip external_mesa3d-9cee3ff562f3e4b51bfd30338fd1ba7716ac5737.tar.gz external_mesa3d-9cee3ff562f3e4b51bfd30338fd1ba7716ac5737.tar.bz2 |
i965: Remove *_generator::shader field; use prog field instead.
The "shader" field in fs_generator, vec4_generator, and gen8_generator
was only used for one purpose; to figure out if we were compiling an
assembly program or a GLSL shader (shader is NULL for assembly
programs). And it wasn't being used properly: in vec4 shaders we were
always initializing it based on
prog->_LinkedShaders[MESA_SHADER_FRAGMENT], regardless of whether we
were compiling a geometry shader or a vertex shader.
This patch simplifies things by using the "prog" field instead; this
is also NULL for assembly programs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen8_fs_generator.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp index 6c710bc..e0b5212 100644 --- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp @@ -43,8 +43,6 @@ gen8_fs_generator::gen8_fs_generator(struct brw_context *brw, : gen8_generator(brw, shader_prog, fp ? &fp->Base : NULL, c), c(c), fp(fp), dual_source_output(dual_source_output) { - shader = - shader_prog ? shader_prog->_LinkedShaders[MESA_SHADER_FRAGMENT] : NULL; } gen8_fs_generator::~gen8_fs_generator() @@ -570,7 +568,7 @@ gen8_fs_generator::generate_code(exec_list *instructions) const void *last_annotation_ir = NULL; if (unlikely(INTEL_DEBUG & DEBUG_WM)) { - if (shader) { + if (prog) { printf("Native code for fragment shader %d (SIMD%d dispatch):\n", shader_prog->Name, dispatch_width); } else if (fp) { @@ -611,7 +609,7 @@ gen8_fs_generator::generate_code(exec_list *instructions) last_annotation_ir = ir->ir; if (last_annotation_ir) { printf(" "); - if (shader) { + if (prog) { ((ir_instruction *) ir->ir)->print(); } else if (prog) { const prog_instruction *fpi; |