i965: execution of frag-shader when it has atomic buffer

Ensure that the GPU spawns the fragment shader thread for those
fragment shaders with atomic buffer access.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
This commit is contained in:
Kevin Rogovin
2015-06-17 13:29:57 +03:00
committed by Martin Peres
parent bbb700967e
commit 9ded636975
2 changed files with 7 additions and 0 deletions

View File

@@ -77,6 +77,10 @@ upload_wm_state(struct brw_context *brw)
dw1 |= GEN7_WM_KILL_ENABLE;
}
if (_mesa_active_fragment_shader_has_atomic_ops(&brw->ctx)) {
dw1 |= GEN7_WM_DISPATCH_ENABLE;
}
/* _NEW_BUFFERS | _NEW_COLOR */
if (brw_color_buffer_write_enabled(brw) || writes_depth ||
dw1 & GEN7_WM_KILL_ENABLE) {

View File

@@ -58,6 +58,9 @@ gen8_upload_ps_extra(struct brw_context *brw,
if (prog_data->uses_omask)
dw1 |= GEN8_PSX_OMASK_TO_RENDER_TARGET;
if (_mesa_active_fragment_shader_has_atomic_ops(&brw->ctx))
dw1 |= GEN8_PSX_SHADER_HAS_UAV;
BEGIN_BATCH(2);
OUT_BATCH(_3DSTATE_PS_EXTRA << 16 | (2 - 2));
OUT_BATCH(dw1);