intel/isl/gen7: Don't allow multisampled surfaces with valign2
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 18 Jul 2017 14:10:59 +0000 (17:10 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 21 Jul 2017 21:14:16 +0000 (00:14 +0300)
commitfbfc6a2f67f3b72fa6e86250925eb8f5005c75ae
tree36b7a0c8aaf67695fdc46cdaa0b87c49a4f5f06d
parentdf9bb8dc059a3cdb0a2099deb25cb4292e301933
intel/isl/gen7: Don't allow multisampled surfaces with valign2

There is the same constraintg later on as assert in
isl_gen7_choose_image_alignment_el() so catch it earlier in order
to return error instead of crash.

Needed to avoid crashes with piglits on IVB and HSW:

arb_internalformat_query2.image_format_compatibility_type pname checks
arb_internalformat_query2.all internalformat_<x>_type pname checks
arb_internalformat_query2.max dimensions related pname checks
arb_copy_image.arb_copy_image-formats --samples=2/4/6/8
arb_texture_float.multisample-fast-clear gl_arb_texture_float

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/isl/isl_gen7.c