summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-11-08 02:21:42 -0800
committerKenneth Graunke <[email protected]>2014-11-27 20:25:23 -0800
commit06372c3fa9940b6ebbc03ebb2cdfdedc87076cc0 (patch)
treef23e39e57a81d8bcc9f85ca2f552615274d0ca92
parenta0f8b363c0976ab3b58b76df687e664b0c99d6c9 (diff)
i965: Use brw_wm_prog_data::uses_kill, not gl_fragment_program::UsesKill
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/gen6_wm_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen7_wm_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen8_depth_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen8_ps_state.c2
5 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 8d5fcced648..233260f8109 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -175,7 +175,8 @@ brw_upload_wm_unit(struct brw_context *brw)
wm->wm5.program_computes_depth = 0;
/* _NEW_COLOR */
- wm->wm5.program_uses_killpixel = fp->UsesKill || ctx->Color.AlphaEnabled;
+ wm->wm5.program_uses_killpixel =
+ prog_data->uses_kill || ctx->Color.AlphaEnabled;
wm->wm5.enable_8_pix = 1;
if (prog_data->prog_offset_16)
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index 8081cccae51..c6c7f22e859 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -188,7 +188,7 @@ upload_wm_state(struct brw_context *brw)
GEN6_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT;
/* _NEW_COLOR, _NEW_MULTISAMPLE */
- if (fp->program.UsesKill || ctx->Color.AlphaEnabled ||
+ if (prog_data->uses_kill || ctx->Color.AlphaEnabled ||
ctx->Multisample.SampleAlphaToCoverage ||
prog_data->uses_omask)
dw5 |= GEN6_WM_KILL_ENABLE;
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c
index 62edb2da1a8..8f851d80b75 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c
@@ -86,7 +86,7 @@ upload_wm_state(struct brw_context *brw)
/* _NEW_COLOR, _NEW_MULTISAMPLE */
/* Enable if the pixel shader kernel generates and outputs oMask.
*/
- if (fp->program.UsesKill || ctx->Color.AlphaEnabled ||
+ if (prog_data->uses_kill || ctx->Color.AlphaEnabled ||
ctx->Multisample.SampleAlphaToCoverage ||
prog_data->uses_omask) {
dw1 |= GEN7_WM_KILL_ENABLE;
diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i965/gen8_depth_state.c
index e716141e62b..8efc7c5d4ae 100644
--- a/src/mesa/drivers/dri/i965/gen8_depth_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c
@@ -286,7 +286,7 @@ pma_fix_enable(const struct brw_context *brw)
(fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) &&
fp->FragDepthLayout != FRAG_DEPTH_LAYOUT_UNCHANGED;
- /* BRW_NEW_FRAGMENT_PROGRAM: 3DSTATE_PS_EXTRA::PixelShaderKillsPixels
+ /* CACHE_NEW_WM_PROG: 3DSTATE_PS_EXTRA::PixelShaderKillsPixels
* CACHE_NEW_WM_PROG: 3DSTATE_PS_EXTRA::oMask Present to RenderTarget
* _NEW_MULTISAMPLE: 3DSTATE_PS_BLEND::AlphaToCoverageEnable
* _NEW_COLOR: 3DSTATE_PS_BLEND::AlphaTestEnable
@@ -295,7 +295,7 @@ pma_fix_enable(const struct brw_context *brw)
* 3DSTATE_WM::ForceKillPix != ForceOff is always true.
*/
const bool kill_pixel =
- fp->UsesKill ||
+ brw->wm.prog_data->uses_kill ||
brw->wm.prog_data->uses_omask ||
(ctx->Multisample._Enabled && ctx->Multisample.SampleAlphaToCoverage) ||
ctx->Color.AlphaEnabled;
diff --git a/src/mesa/drivers/dri/i965/gen8_ps_state.c b/src/mesa/drivers/dri/i965/gen8_ps_state.c
index d6577fd704c..0c17243e3fc 100644
--- a/src/mesa/drivers/dri/i965/gen8_ps_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_ps_state.c
@@ -40,7 +40,7 @@ upload_ps_extra(struct brw_context *brw)
dw1 |= GEN8_PSX_PIXEL_SHADER_VALID;
- if (fp->program.UsesKill)
+ if (prog_data->uses_kill)
dw1 |= GEN8_PSX_KILL_ENABLE;
if (prog_data->num_varying_inputs != 0)