i965/gen7: Enable fragment shader dispatch if the program has image uniforms.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 3 Feb 2015 15:14:10 +0000 (17:14 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 11 Aug 2015 12:07:38 +0000 (15:07 +0300)
Shaders with image uniforms may have side effects.  Make sure that
fragment shader threads are dispatched if the shader has any image
uniforms.

v2: Use brw_stage_prog_data::nr_image_params to find out if the shader
    has image uniforms instead of checking core mesa data structures
    (Ken).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen7_wm_state.c

index d7be58dd0f7169b058d4e11c68013c0e10bc607d..aa47421844e533b200590902327e6c04f714e4b2 100644 (file)
@@ -83,6 +83,7 @@ upload_wm_state(struct brw_context *brw)
 
    /* _NEW_BUFFERS | _NEW_COLOR */
    if (brw_color_buffer_write_enabled(brw) || writes_depth ||
+       prog_data->base.nr_image_params ||
        dw1 & GEN7_WM_KILL_ENABLE) {
       dw1 |= GEN7_WM_DISPATCH_ENABLE;
    }