summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-05-18 16:09:49 +0300
committerTopi Pohjolainen <[email protected]>2016-06-23 21:39:09 +0300
commit874f2e952363a070f373f44c849ef9d1ededeabc (patch)
treec73a1eb22777356369e80070c667adea791a10f2 /src/mesa/drivers
parentf5e8575ab474f0b30e37b527b47ebb0b03bf6997 (diff)
i965/blorp: Use prog data counters to guide wm/ps setup
just as core upload logic does. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_blorp.c4
-rw-r--r--src/mesa/drivers/dri/i965/gen7_blorp.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen8_blorp.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.c b/src/mesa/drivers/dri/i965/gen6_blorp.c
index 317a5f2dd21..3fc1d57261f 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.c
@@ -656,7 +656,9 @@ gen6_blorp_emit_wm_config(struct brw_context *brw,
dw5 |= GEN6_WM_LINE_END_CAP_AA_WIDTH_0_5;
dw5 |= (brw->max_wm_threads - 1) << GEN6_WM_MAX_THREADS_SHIFT;
dw6 |= 0 << GEN6_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; /* No interp */
- dw6 |= 0 << GEN6_WM_NUM_SF_OUTPUTS_SHIFT; /* No inputs from SF */
+ dw6 |= (params->wm_prog_data ? prog_data->num_varying_inputs : 0) <<
+ GEN6_WM_NUM_SF_OUTPUTS_SHIFT;
+
if (params->wm_prog_data) {
dw5 |= GEN6_WM_DISPATCH_ENABLE; /* We are rendering */
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
index 92617dbcae3..bb760e787c8 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
@@ -555,6 +555,8 @@ gen7_blorp_emit_ps_config(struct brw_context *brw,
dw4 |= GEN7_PS_8_DISPATCH_ENABLE;
if (params->wm_prog_data->dispatch_16)
dw4 |= GEN7_PS_16_DISPATCH_ENABLE;
+ if (params->wm_prog_data->num_varying_inputs)
+ dw4 |= GEN7_PS_ATTRIBUTE_ENABLE;
} else {
/* The hardware gets angry if we don't enable at least one dispatch
* mode, so just enable 16-pixel dispatch if we don't have a program.
diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.c b/src/mesa/drivers/dri/i965/gen8_blorp.c
index 8d696cf75ca..1df2e3b63af 100644
--- a/src/mesa/drivers/dri/i965/gen8_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen8_blorp.c
@@ -452,10 +452,11 @@ gen8_blorp_emit_ps_extra(struct brw_context *brw,
dw1 |= GEN8_PSX_PIXEL_SHADER_VALID;
- if (params->src.mt) {
+ if (params->src.mt)
dw1 |= GEN8_PSX_KILL_ENABLE;
+
+ if (params->wm_prog_data->num_varying_inputs)
dw1 |= GEN8_PSX_ATTRIBUTE_ENABLE;
- }
if (params->dst.num_samples > 1 && prog_data &&
prog_data->persample_msaa_dispatch)