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/+/27268
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Vulkan/VkPipeline.cpp b/src/Vulkan/VkPipeline.cpp
index d05ba16..dcaba8b 100644
--- a/src/Vulkan/VkPipeline.cpp
+++ b/src/Vulkan/VkPipeline.cpp
@@ -252,26 +252,6 @@
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 @@
{
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