anv/pipeline: Don't look at blend state unless we have an attachment
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 Jan 2018 01:10:34 +0000 (17:10 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 26 Jan 2018 09:44:45 +0000 (01:44 -0800)
commitc8949e24984266cca3593291c30ea199baef5358
tree08839de478d8eb9515c42f58e75924bf67c29a2a
parent8116b9170bc36bb15512f97a7680ad97bddd56a8
anv/pipeline: Don't look at blend state unless we have an attachment

Without this, we may end up dereferencing blend before we check for
binding->index != UINT32_MAX.  However, Vulkan allows the blend state to
be NULL so long as you don't have any color attachments.  This fixes a
segfault when running The Talos Principal.

Fixes: 12f4e00b69e724a23504b7bd3958fb75dc462950
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/genX_pipeline.c