Lines Matching defs:gpCI

300 bool graphicsPipelineHasDynamicState(const VkGraphicsPipelineCreateInfo& gpCI, VkDynamicState state)
302 if (gpCI.pDynamicState == DE_NULL)
305 if (gpCI.pDynamicState->pDynamicStates == DE_NULL)
308 for (deUint32 i = 0; i < gpCI.pDynamicState->dynamicStateCount; ++i)
309 if (gpCI.pDynamicState->pDynamicStates[i] == state)
315 std::size_t calculateGraphicsPipelineHash (const VkGraphicsPipelineCreateInfo& gpCI, const std::map<deUint64, std::size_t>& objectHashes)
319 hashPNextChain(seed, gpCI.pNext, objectHashes);
321 hash_combine(seed, gpCI.flags);
333 if (gpCI.pStages != DE_NULL)
335 for (deUint32 i = 0; i < gpCI.stageCount; ++i)
337 hashPNextChain(seed, gpCI.pStages[i].pNext, objectHashes);
339 hash_combine(seed, deUint32(gpCI.pStages[i].flags), deUint32(gpCI.pStages[i].stage));
340 auto it = objectHashes.find(gpCI.pStages[i].module.getInternal());
344 hash_combine(seed, std::string(gpCI.pStages[i].pName));
346 if (gpCI.pStages[i].pSpecializationInfo != DE_NULL)
348 if (gpCI.pStages[i].pSpecializationInfo->pMapEntries != DE_NULL)
350 for (deUint32 j = 0; j < gpCI.pStages[i].pSpecializationInfo->mapEntryCount; ++j)
351 hash_combine(seed, gpCI.pStages[i].pSpecializationInfo->pMapEntries[j].constantID, gpCI.pStages[i].pSpecializationInfo->pMapEntries[j].offset, gpCI.pStages[i].pSpecializationInfo->pMapEntries[j].size);
353 hash_combine(seed, MemoryArea(gpCI.pStages[i].pSpecializationInfo->pData, gpCI.pStages[i].pSpecializationInfo->dataSize));
356 if (gpCI.pStages[i].stage == VK_SHADER_STAGE_VERTEX_BIT)
361 if (gpCI.pStages[i].stage == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT)
367 if (gpCI.pDynamicState != DE_NULL)
369 if (gpCI.pDynamicState->pDynamicStates != DE_NULL)
370 for (deUint32 i = 0; i < gpCI.pDynamicState->dynamicStateCount; ++i)
372 if (gpCI.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_VIEWPORT || gpCI.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT)
377 if (gpCI.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_SCISSOR || gpCI.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT)
382 if (gpCI.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)
386 if (gpCI.pRasterizationState != DE_NULL)
388 if (gpCI.pRasterizationState->rasterizerDiscardEnable == VK_FALSE)
399 if (vertexInputStateRequired && gpCI.pVertexInputState != DE_NULL)
401 hashPNextChain(seed, gpCI.pVertexInputState->pNext, objectHashes);
402 hash_combine(seed, gpCI.pVertexInputState->flags);
403 if (gpCI.pVertexInputState->pVertexBindingDescriptions != DE_NULL)
404 for (deUint32 i = 0; i < gpCI.pVertexInputState->vertexBindingDescriptionCount; ++i)
405 hash_combine(seed, gpCI.pVertexInputState->pVertexBindingDescriptions[i].binding, gpCI.pVertexInputState->pVertexBindingDescriptions[i].stride, deUint32(gpCI.pVertexInputState->pVertexBindingDescriptions[i].inputRate));
406 if (gpCI.pVertexInputState->pVertexAttributeDescriptions != DE_NULL)
407 for (deUint32 i = 0; i < gpCI.pVertexInputState->vertexAttributeDescriptionCount; ++i)
408 hash_combine(seed, gpCI.pVertexInputState->pVertexAttributeDescriptions[i].location, gpCI.pVertexInputState->pVertexAttributeDescriptions[i].binding, deUint32(gpCI.pVertexInputState->pVertexAttributeDescriptions[i].format), gpCI.pVertexInputState->pVertexAttributeDescriptions[i].offset);
411 if (inputAssemblyStateRequired && gpCI.pInputAssemblyState != DE_NULL)
413 hashPNextChain(seed, gpCI.pInputAssemblyState->pNext, objectHashes);
414 hash_combine(seed, deUint32(gpCI.pInputAssemblyState->flags), deUint32(gpCI.pInputAssemblyState->topology), gpCI.pInputAssemblyState->primitiveRestartEnable);
416 if (tessellationStateRequired && gpCI.pTessellationState != DE_NULL)
418 hashPNextChain(seed, gpCI.pTessellationState->pNext, objectHashes);
419 hash_combine(seed, gpCI.pTessellationState->flags, gpCI.pTessellationState->patchControlPoints);
421 if (viewportStateRequired && gpCI.pViewportState != DE_NULL)
423 hashPNextChain(seed, gpCI.pViewportState->pNext, objectHashes);
424 hash_combine(seed, gpCI.pViewportState->flags);
426 if (viewportStateViewportsRequired && gpCI.pViewportState->pViewports != DE_NULL)
427 for (deUint32 i = 0; i < gpCI.pViewportState->viewportCount; ++i)
428 hash_combine(seed, gpCI.pViewportState->pViewports[i].x, gpCI.pViewportState->pViewports[i].y, gpCI.pViewportState->pViewports[i].width, gpCI.pViewportState->pViewports[i].height, gpCI.pViewportState->pViewports[i].minDepth, gpCI.pViewportState->pViewports[i].maxDepth);
430 if (viewportStateScissorsRequired && gpCI.pViewportState->pScissors != DE_NULL)
431 for (deUint32 i = 0; i < gpCI.pViewportState->scissorCount; ++i)
432 hash_combine(seed, gpCI.pViewportState->pScissors[i].offset.x, gpCI.pViewportState->pScissors[i].offset.y, gpCI.pViewportState->pScissors[i].extent.width, gpCI.pViewportState->pScissors[i].extent.height);
434 if (gpCI.pRasterizationState != DE_NULL)
436 hashPNextChain(seed, gpCI.pRasterizationState->pNext, objectHashes);
437 hash_combine(seed, deUint32(gpCI.pRasterizationState->flags), gpCI.pRasterizationState->depthClampEnable, gpCI.pRasterizationState->rasterizerDiscardEnable, deUint32(gpCI.pRasterizationState->polygonMode), deUint32(gpCI.pRasterizationState->cullMode), deUint32(gpCI.pRasterizationState->frontFace), gpCI.pRasterizationState->depthBiasEnable, gpCI.pRasterizationState->depthBiasConstantFactor, gpCI.pRasterizationState->depthBiasClamp, gpCI.pRasterizationState->depthBiasSlopeFactor, gpCI.pRasterizationState->lineWidth);
439 if (multiSampleStateRequired && gpCI.pMultisampleState != DE_NULL)
441 hashPNextChain(seed, gpCI.pMultisampleState->pNext, objectHashes);
442 hash_combine(seed, deUint32(gpCI.pMultisampleState->flags), deUint32(gpCI.pMultisampleState->rasterizationSamples), gpCI.pMultisampleState->sampleShadingEnable, gpCI.pMultisampleState->minSampleShading);
443 if (gpCI.pMultisampleState->pSampleMask != DE_NULL)
444 for (int i = 0; i < ((gpCI.pMultisampleState->rasterizationSamples + 31) / 32); i++)
445 hash_combine(seed, gpCI.pMultisampleState->pSampleMask[i]);
446 hash_combine(seed, gpCI.pMultisampleState->alphaToCoverageEnable, gpCI.pMultisampleState->alphaToOneEnable);
448 if (depthStencilStateRequired && gpCI.pDepthStencilState != DE_NULL)
450 hashPNextChain(seed, gpCI.pDepthStencilState->pNext, objectHashes);
451 hash_combine(seed, deUint32(gpCI.pDepthStencilState->flags), gpCI.pDepthStencilState->depthTestEnable, gpCI.pDepthStencilState->depthWriteEnable, deUint32(gpCI.pDepthStencilState->depthCompareOp), gpCI.pDepthStencilState->depthBoundsTestEnable, gpCI.pDepthStencilState->stencilTestEnable);
452 if (gpCI.pDepthStencilState->stencilTestEnable)
454 hash_combine(seed, deUint32(gpCI.pDepthStencilState->front.failOp), deUint32(gpCI.pDepthStencilState->front.passOp), deUint32(gpCI.pDepthStencilState->front.depthFailOp), deUint32(gpCI.pDepthStencilState->front.compareOp), gpCI.pDepthStencilState->front.compareMask, gpCI.pDepthStencilState->front.writeMask, gpCI.pDepthStencilState->front.reference);
455 hash_combine(seed, deUint32(gpCI.pDepthStencilState->back.failOp), deUint32(gpCI.pDepthStencilState->back.passOp), deUint32(gpCI.pDepthStencilState->back.depthFailOp), deUint32(gpCI.pDepthStencilState->back.compareOp), gpCI.pDepthStencilState->back.compareMask, gpCI.pDepthStencilState->back.writeMask, gpCI.pDepthStencilState->back.reference);
457 hash_combine(seed, gpCI.pDepthStencilState->minDepthBounds, gpCI.pDepthStencilState->maxDepthBounds);
459 if (colorBlendStateRequired && gpCI.pColorBlendState != DE_NULL)
461 hashPNextChain(seed, gpCI.pColorBlendState->pNext, objectHashes);
462 hash_combine(seed, deUint32(gpCI.pColorBlendState->flags), gpCI.pColorBlendState->logicOpEnable, deUint32(gpCI.pColorBlendState->logicOp));
466 if (gpCI.pColorBlendState->pAttachments != DE_NULL)
468 for (deUint32 i = 0; i < gpCI.pColorBlendState->attachmentCount; ++i)
473 gpCI.pColorBlendState->pAttachments[i].blendEnable, deUint32(gpCI.pColorBlendState->pAttachments[i].srcColorBlendFactor), deUint32(gpCI.pColorBlendState->pAttachments[i].dstColorBlendFactor), deUint32(gpCI.pColorBlendState->pAttachments[i].colorBlendOp),
474 deUint32(gpCI.pColorBlendState->pAttachments[i].srcAlphaBlendFactor), deUint32(gpCI.pColorBlendState->pAttachments[i].dstAlphaBlendFactor), deUint32(gpCI.pColorBlendState->pAttachments[i].alphaBlendOp), deUint32(gpCI.pColorBlendState->pAttachments[i].colorWriteMask)
476 if (constFactors.find(gpCI.pColorBlendState->pAttachments[i].srcColorBlendFactor) != end(constFactors)) hashBlendConstants = true;
477 if (constFactors.find(gpCI.pColorBlendState->pAttachments[i].dstColorBlendFactor) != end(constFactors)) hashBlendConstants = true;
478 if (constFactors.find(gpCI.pColorBlendState->pAttachments[i].srcAlphaBlendFactor) != end(constFactors)) hashBlendConstants = true;
479 if (constFactors.find(gpCI.pColorBlendState->pAttachments[i].dstAlphaBlendFactor) != end(constFactors)) hashBlendConstants = true;
483 if (hashBlendConstants && !graphicsPipelineHasDynamicState(gpCI, VK_DYNAMIC_STATE_BLEND_CONSTANTS))
485 hash_combine(seed, gpCI.pColorBlendState->blendConstants[i]);
487 if (gpCI.pDynamicState != DE_NULL)
489 hashPNextChain(seed, gpCI.pDynamicState->pNext, objectHashes);
490 hash_combine(seed, gpCI.pDynamicState->flags);
491 if (gpCI.pDynamicState->pDynamicStates != DE_NULL)
492 for (deUint32 i = 0; i < gpCI.pDynamicState->dynamicStateCount; ++i)
493 hash_combine(seed, deUint32(gpCI.pDynamicState->pDynamicStates[i]));
497 auto it = objectHashes.find(gpCI.layout.getInternal());
503 auto it = objectHashes.find(gpCI.renderPass.getInternal());
508 hash_combine(seed, gpCI.subpass);
511 auto it = objectHashes.find(gpCI.basePipelineHandle.getInternal());
515 hash_combine(seed, gpCI.basePipelineIndex);