v3dv: don't assume that VkPipelineColorBlendStateCreateInfo is provided

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-03-10 12:41:41 +01:00 committed by Marge Bot
parent 2bec99c8a0
commit 3e3b8dbfcc
1 changed files with 3 additions and 3 deletions

View File

@ -658,9 +658,9 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key,
const VkPipelineColorBlendStateCreateInfo *cb_info =
pCreateInfo->pColorBlendState;
key->logicop_func = (cb_info->logicOpEnable == VK_FALSE ?
PIPE_LOGICOP_COPY :
vk_to_pipe_logicop[cb_info->logicOp]);
key->logicop_func = cb_info && cb_info->logicOpEnable == VK_TRUE ?
vk_to_pipe_logicop[cb_info->logicOp] :
PIPE_LOGICOP_COPY;
const VkPipelineMultisampleStateCreateInfo *ms_info =
pCreateInfo->pMultisampleState;