anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Apr 2017 19:25:15 +0000 (12:25 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Apr 2017 01:33:51 +0000 (18:33 -0700)
commitc6f69eea6ac549fc2ffa46944de4dd82c9b53329
tree56de3f537176ad04058eb3464dc46157256a9698
parent3503b2714b98684a2ceba5f4fd9a5bfbfbcaad38
anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex

When the shader does not set one of these values, they are supposed to
get a default value of 0.  We have hardware bits in 3DSTATE_CLIP for
this but haven't been setting them.  This fixes the intermittent failure
of dEQP-VK.geometry.layered.3d.render_to_default_layer.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/genX_pipeline.c