[Mesa-dev] [PATCH 12/14] i965: Add uses_dfdy to brw_scalar_prog_data
Jordan Justen
jordan.l.justen at intel.com
Mon Sep 1 09:44:36 PDT 2014
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/i965/brw_context.h | 1 +
src/mesa/drivers/dri/i965/brw_scalar_generator.cpp | 4 ++--
src/mesa/drivers/dri/i965/brw_wm.c | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index a5705ca..1705a7f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -346,6 +346,7 @@ struct brw_scalar_prog_data {
bool uses_pos_offset;
bool uses_omask;
bool uses_kill;
+ bool uses_dfdy;
uint32_t prog_offset_16;
/**
diff --git a/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp b/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp
index 453f4d0..e8a43df 100644
--- a/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_scalar_generator.cpp
@@ -1804,10 +1804,10 @@ scalar_generator::generate_code(const cfg_t *cfg)
generate_ddx(inst, dst, src[0], src[1]);
break;
case FS_OPCODE_DDY:
- /* Make sure fp->UsesDFdy flag got set (otherwise there's no
+ /* Make sure prog_data->uses_dfdy flag got set (otherwise there's no
* guarantee that key->render_to_fbo is set).
*/
- assert(fp->UsesDFdy);
+ assert(prog_data->uses_dfdy);
generate_ddy(inst, dst, src[0], src[1], key->render_to_fbo);
break;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 375334d..215872c 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -158,6 +158,7 @@ bool do_wm_prog(struct brw_context *brw,
memset(&prog_data, 0, sizeof(prog_data));
prog_data.base.uses_kill = fp->program.UsesKill;
+ prog_data.base.uses_dfdy = fp->program.UsesDFdy;
/* Allocate the references to the uniforms that will end up in the
* prog_data associated with the compiled program, and which will be freed
--
2.1.0
More information about the mesa-dev
mailing list