i965/blorp: Fix hiz ops on MSAA surfaces
authorChris Forbes <chrisf@ijw.co.nz>
Tue, 18 Nov 2014 08:49:53 +0000 (21:49 +1300)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 10 Feb 2016 08:00:05 +0000 (09:00 +0100)
commit43d23e879c797fa9b6cbbae15e101f2a3ee64751
tree31f2270578d72839df234dc20f3f61a43fe4dc05
parent878b2b8964c23d3be72dc28ef1a9758927f53214
i965/blorp: Fix hiz ops on MSAA surfaces

Two things were broken here:
- The depth/stencil surface dimensions were broken for MSAA.
- Sample count was programmed incorrectly.

Result was the depth resolve didn't work correctly on MSAA surfaces, and
so sampling the surface later produced garbage.

Fixes the new piglit test arb_texture_multisample-sample-depth, and
various artifacts in 'tesseract' with msaa=4 glineardepth=0.

Fixes freedesktop bug #76396.

Not observed any piglit regressions on Haswell.

v2: Just set brw_hiz_op_params::dst.num_samples rather than adding a
    helper function (Ken).

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
v3: moved the alignment needed for hiz+msaa to brw_blorp.cpp, as
    suggested by Chad Versace (Alejandro Piñeiro on behalf of Chris
    Forbes)

Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_blorp.cpp