diff options
| author | Chris Forbes <chrisforbes@google.com> | 2016-08-22 16:11:22 +1200 |
|---|---|---|
| committer | Chris Forbes <chrisforbes@google.com> | 2016-08-23 13:12:40 +1200 |
| commit | d4188158cfdff3c14d26b4166fe672b279db012a (patch) | |
| tree | 6855511163807fd1255d4df5f3b6da74a61dbea5 /layers/core_validation.cpp | |
| parent | 8d20a9eda947c8b1fb8b3cf3a5277b0c8d960260 (diff) | |
| download | usermoji-d4188158cfdff3c14d26b4166fe672b279db012a.tar.xz | |
layers: Validate fundamental type for input attachments
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 80e05490..3cda6489 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2801,8 +2801,16 @@ static bool validate_pipeline_shader_stage(debug_report_data *report_data, pass = false; } } - - /* TODO: type match, etc */ + else if (get_format_type(rpci->pAttachments[index].format) != + get_fundamental_type(module, use.second.type_id)) { + if (log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0, __LINE__, + SHADER_CHECKER_INPUT_ATTACHMENT_TYPE_MISMATCH, "SC", + "Subpass input attachment %u format of %s does not match type used in shader `%s`", + use.first, string_VkFormat(rpci->pAttachments[index].format), + describe_type(module, use.second.type_id).c_str())) { + pass = false; + } + } } } |
