i965/Gen8: Set up layer constraints properly for depth buffers
authorChris Forbes <chrisf@ijw.co.nz>
Thu, 8 May 2014 05:06:01 +0000 (17:06 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 8 May 2014 21:46:20 +0000 (09:46 +1200)
commit23e9f06569f58062820ab058d8057e9325042105
treeac9b1aeb4a25cef436ca29a0c2cce8769b4a31cf
parent77d55ef4819436ebbf9786a1e720ec00707bbb19
i965/Gen8: Set up layer constraints properly for depth buffers

Same issues as the previous commit fixed for Gen7:
- Bogus physical->logical layer conversion; depth/stencil surfaces
  are still IMS layout on Gen8.
- mt_layer ignored in layered rendering case, which breaks handling
  of views with MinLayer.
- Render target array extent not set correctly for arrays.

I'm not able to test this one since I can't get a Broadwell yet, but
it's the same set of fixes as for Gen7.

V2: Restore the MAX2() to account for zero depth/layer_count.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen8_depth_state.c