anv/pipeline: Fix requirement for depthstencil state
authorChad Versace <chad.versace@intel.com>
Mon, 19 Oct 2015 18:39:30 +0000 (11:39 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 20 Oct 2015 18:29:16 +0000 (11:29 -0700)
commit2484d1a01fff6127b45280ee9bfbd1bbfaa425db
treeb814676f7dec0a2be91887ac93e2fafe88398246
parentb51468b519f447c8e0afd492ce09d7c9485e222b
anv/pipeline: Fix requirement for depthstencil state

The Vulkan spec allows VkGraphicsPipelineCreateInfo::pDepthStencilState
to be NULL when the pipeline's subpass contains no depthstencil
attachment (see spec quote below). anv_pipeline_init_dynamic_state()
required it unconditionally.

This path fixes anv_pipeline_init_dynamic_state() to access
pDepthStencilState only when there is a depthstencil attachment.

From the Vulkan spec (20 Oct 2015, git-aa308cb)

   pDepthStencilState [...] may only be NULL if renderPass and subpass
   specify a subpass that has no depth/stencil attachment.
src/vulkan/anv_pipeline.c