anv/pipeline: Don't dereference NULL dynamic state pointers
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 9 Jun 2016 21:48:00 +0000 (14:48 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 13 Jun 2016 18:35:45 +0000 (11:35 -0700)
commita4a59172482d50318a5ae7f99021bcf0125e0f53
tree23ff81708f46bc203a654a214aabbb5253801b27
parenta0d84a9ef9df69606a928cf7dca8f2b80dea1c36
anv/pipeline: Don't dereference NULL dynamic state pointers

Add guards to prevent dereferencing NULL dynamic pipeline state. Asserts
of pCreateInfo members are moved to the earliest points at which they
should not be NULL.

This fixes a segfault seen in the McNopper demo, VKTS_Example09.

v3 (Jason Ekstrand):
   - Fix disabled rasterization check
   - Revert opaque detection of color attachment usage

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_pipeline.c