i965/gen6: Enable the features required for GL_ARB_sample_shading
authorAnuj Phogat <anuj.phogat@gmail.com>
Mon, 7 Oct 2013 19:05:56 +0000 (12:05 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 1 Nov 2013 23:01:48 +0000 (16:01 -0700)
commit8d7a934d0982d7c187e2d33c177063a4c3406a76
tree480f78b7659d465f8bb0dae0ad3fd9615e389b1c
parente26bdf56a479f0da63da09793acbb0bcebeb29e4
i965/gen6: Enable the features required for GL_ARB_sample_shading

- Enable GEN6_WM_MSDISPMODE_PERSAMPLE, GEN6_WM_POSOFFSET_SAMPLE,
  GEN6_WM_OMASK_TO_RENDER_TARGET as per extension's specification.
- Only enable one of GEN6_WM_8_DISPATCH_ENABLE or GEN6_WM_16_DISPATCH_ENABLE
  when GEN6_WM_MSDISPMODE_PERSAMPLE is enabled.
  Refer SNB PRM Vol. 2, Part 1, Page 279 for details.

V2:
    - Use shared function _mesa_get_min_invocations_per_fragment().
    - Use brw_wm_prog_data variables: uses_pos_offset, uses_omask.

V3:
    - Enable simd16 dispatch with per sample shading.
    - Make changes to give preference to 'simd16 only' mode over
      'simd8 only' mode in case of non 1x per sample shading.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/gen6_wm_state.c