Commit d1ab73db by Chris Forbes

Remove asserts blocking specialization constant use

These have been fully implemented for some time. Bug: b/124058197 Change-Id: I8146c0902aa0c4caa974e5af5b1a36104846934c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27268Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 085f57ee
......@@ -252,26 +252,6 @@ GraphicsPipeline::GraphicsPipeline(const VkGraphicsPipelineCreateInfo* pCreateIn
UNIMPLEMENTED();
}
const VkPipelineShaderStageCreateInfo& vertexStage = pCreateInfo->pStages[0];
if((vertexStage.stage != VK_SHADER_STAGE_VERTEX_BIT) ||
(vertexStage.flags != 0) ||
!((vertexStage.pSpecializationInfo == nullptr) ||
((vertexStage.pSpecializationInfo->mapEntryCount == 0) &&
(vertexStage.pSpecializationInfo->dataSize == 0))))
{
UNIMPLEMENTED();
}
const VkPipelineShaderStageCreateInfo& fragmentStage = pCreateInfo->pStages[1];
if((fragmentStage.stage != VK_SHADER_STAGE_FRAGMENT_BIT) ||
(fragmentStage.flags != 0) ||
!((fragmentStage.pSpecializationInfo == nullptr) ||
((fragmentStage.pSpecializationInfo->mapEntryCount == 0) &&
(fragmentStage.pSpecializationInfo->dataSize == 0))))
{
UNIMPLEMENTED();
}
const VkPipelineVertexInputStateCreateInfo* vertexInputState = pCreateInfo->pVertexInputState;
if(vertexInputState->flags != 0)
{
......@@ -460,8 +440,12 @@ void GraphicsPipeline::compileShaders(const VkAllocationCallbacks* pAllocator, c
{
for (auto pStage = pCreateInfo->pStages; pStage != pCreateInfo->pStages + pCreateInfo->stageCount; pStage++)
{
auto module = Cast(pStage->module);
if (pStage->flags != 0)
{
UNIMPLEMENTED();
}
auto module = Cast(pStage->module);
auto code = preprocessSpirv(module->getCode(), pStage->pSpecializationInfo);
// TODO: also pass in any pipeline state which will affect shader compilation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment