diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-04-06 11:21:28 +1200 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-04-06 09:41:53 -0600 |
| commit | 25db07869d73711fbd09e333109a3df4d2b13628 (patch) | |
| tree | 27993076e1269f80a33ee03030a88a2d158fa8d6 /layers/core_validation.cpp | |
| parent | c28e09fc31c687850e03dc726fcfb1726feb92ec (diff) | |
| download | usermoji-25db07869d73711fbd09e333109a3df4d2b13628.tar.xz | |
layers: Insist on each shader's stage being unique in a pipeline
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 0f49d207..c3768da6 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -3133,6 +3133,17 @@ static bool verifyPipelineCreateState(layer_data *my_data, const VkDevice device if (!validate_and_capture_pipeline_shader_state(my_data, pPipeline)) { skipCall = true; } + // Each shader's stage must be unique + if (pPipeline->duplicate_shaders) { + for (uint32_t stage = VK_SHADER_STAGE_VERTEX_BIT; stage & VK_SHADER_STAGE_ALL_GRAPHICS; stage <<= 1) { + if (pPipeline->duplicate_shaders & stage) { + skipCall |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, + __LINE__, DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, "DS", + "Invalid Pipeline CreateInfo State: Multiple shaders provided for stage %s", + string_VkShaderStageFlagBits(VkShaderStageFlagBits(stage))); + } + } + } // VS is required if (!(pPipeline->active_shaders & VK_SHADER_STAGE_VERTEX_BIT)) { skipCall |= |
