aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-03-29 16:57:02 +1300
committerTobin Ehlis <tobine@google.com>2016-04-04 08:55:17 -0600
commit645dc5b3ef30729e3cc8d17d3fd95fb8c7b5bb9b (patch)
tree1d6a5b4817734717bbd70a3418bfdb77936f4b38
parent0136278fff74c08cdf4e9e31c46f76469828ea3a (diff)
downloadusermoji-645dc5b3ef30729e3cc8d17d3fd95fb8c7b5bb9b.tar.xz
layers: Flag difference in patch decoration correctly
Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/core_validation.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index ae2954fa..70d2bf77 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -1626,11 +1626,9 @@ static bool validate_interface_between_stages(layer_data *my_data, shader_module
}
b_it++;
} else {
- if (types_match(producer, consumer, a_it->second.type_id, b_it->second.type_id,
+ if (!types_match(producer, consumer, a_it->second.type_id, b_it->second.type_id,
producer_stage->arrayed_output && !a_it->second.is_patch,
consumer_stage->arrayed_input && !b_it->second.is_patch)) {
- /* OK! */
- } else {
if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VkDebugReportObjectTypeEXT(0), 0,
__LINE__, SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC", "Type mismatch on location %u.%u: '%s' vs '%s'",
a_first.first, a_first.second,
@@ -1639,6 +1637,16 @@ static bool validate_interface_between_stages(layer_data *my_data, shader_module
pass = false;
}
}
+ if (a_it->second.is_patch != b_it->second.is_patch) {
+ if (log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, /*dev*/ 0,
+ __LINE__, SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, "SC",
+ "Decoration mismatch on location %u.%u: is per-%s in %s stage but"
+ "per-%s in %s stage", a_first.first, a_first.second,
+ a_it->second.is_patch ? "patch" : "vertex", producer_stage->name,
+ b_it->second.is_patch ? "patch" : "vertex", consumer_stage->name)) {
+ pass = false;
+ }
+ }
a_it++;
b_it++;
}