[Mesa-dev] [PATCH 13/14] i965: Remove gl_fragment_program dependence in scalar_generator
Jordan Justen
jordan.l.justen at intel.com
Mon Sep 1 09:44:37 PDT 2014
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
src/mesa/drivers/dri/i965/brw_scalar.h | 4 ++--
src/mesa/drivers/dri/i965/brw_scalar_generator.cpp | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 5c1e31e..8e062d3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3440,7 +3440,7 @@ brw_wm_fs_emit(struct brw_context *brw,
}
const unsigned *assembly = NULL;
- scalar_generator g(brw, mem_ctx, &key->base, prog_data, prog, fp,
+ scalar_generator g(brw, mem_ctx, &key->base, prog_data, prog, &fp->Base,
v.runtime_check_aads_emit, INTEL_DEBUG & DEBUG_WM);
assembly = g.generate_assembly(simd8_cfg, simd16_cfg,
final_assembly_size);
diff --git a/src/mesa/drivers/dri/i965/brw_scalar.h b/src/mesa/drivers/dri/i965/brw_scalar.h
index d19ab56..13c889b 100644
--- a/src/mesa/drivers/dri/i965/brw_scalar.h
+++ b/src/mesa/drivers/dri/i965/brw_scalar.h
@@ -588,7 +588,7 @@ public:
const struct brw_scalar_prog_key *key,
struct brw_scalar_prog_data *prog_data,
struct gl_shader_program *prog,
- struct gl_fragment_program *fp,
+ struct gl_program *glp,
bool runtime_check_aads_emit,
bool debug_flag);
~scalar_generator();
@@ -695,7 +695,7 @@ private:
struct brw_scalar_prog_data *prog_data;
struct gl_shader_program *prog;
- const struct gl_fragment_program *fp;
+ const struct gl_program *glp;
unsigned dispatch_width; /**< 8 or 16 */
diff --git a/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp b/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp
index e8a43df..b11682c 100644
--- a/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp
@@ -41,11 +41,11 @@ scalar_generator::scalar_generator(struct brw_context *brw,
const struct brw_scalar_prog_key *key,
struct brw_scalar_prog_data *prog_data,
struct gl_shader_program *prog,
- struct gl_fragment_program *fp,
+ struct gl_program *glp,
bool runtime_check_aads_emit,
bool debug_flag)
- : brw(brw), key(key), prog_data(prog_data), prog(prog), fp(fp),
+ : brw(brw), key(key), prog_data(prog_data), prog(prog), glp(glp),
runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(debug_flag),
mem_ctx(mem_ctx)
{
@@ -1960,10 +1960,10 @@ scalar_generator::generate_code(const cfg_t *cfg)
"Native code for %s fragment shader %d (SIMD%d dispatch):\n",
prog->Label ? prog->Label : "unnamed",
prog->Name, dispatch_width);
- } else if (fp) {
+ } else if (glp) {
fprintf(stderr,
"Native code for fragment program %d (SIMD%d dispatch):\n",
- fp->Base.Id, dispatch_width);
+ glp->Id, dispatch_width);
} else {
fprintf(stderr, "Native code for blorp program (SIMD%d dispatch):\n",
dispatch_width);
@@ -1973,7 +1973,7 @@ scalar_generator::generate_code(const cfg_t *cfg)
dispatch_width, before_size / 16, before_size, after_size,
100.0f * (before_size - after_size) / before_size);
- const struct gl_program *prog = fp ? &fp->Base : NULL;
+ const struct gl_program *prog = glp;
dump_assembly(p->store, annotation.ann_count, annotation.ann, brw, prog);
ralloc_free(annotation.ann);
--
2.1.0
More information about the mesa-dev
mailing list