diff options
| author | Chris Forbes <chrisforbes@google.com> | 2017-07-20 11:19:16 -0700 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2017-07-20 13:11:11 -0700 |
| commit | 3c5592a130958413a9f72ae9eb0ba6f7f4784c45 (patch) | |
| tree | 5074f99067158b6e226d8b99bde4d86fb082e67d /layers/shader_validation.cpp | |
| parent | c986282a32d2126239eada5aa8fd6022e39b2e57 (diff) | |
| download | usermoji-3c5592a130958413a9f72ae9eb0ba6f7f4784c45.tar.xz | |
layers: Don't complain about missing FS outputs if attachment mask is 0.
Fixes #1931.
Diffstat (limited to 'layers/shader_validation.cpp')
| -rw-r--r-- | layers/shader_validation.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/layers/shader_validation.cpp b/layers/shader_validation.cpp index e0500305..e2bc2bdd 100644 --- a/layers/shader_validation.cpp +++ b/layers/shader_validation.cpp @@ -803,8 +803,13 @@ static bool validate_fs_outputs_against_render_pass(debug_report_data const *rep "fragment shader writes to output location %d with no matching attachment", it_a->first.first); it_a++; } else if (!b_at_end && (a_at_end || it_a->first.first > it_b->first)) { - skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, + // Only complain if there are unmasked channels for this attachment. If the writemask is 0, it's acceptable for the + // shader to not produce a matching output. + if (pPipeline->attachments[it_b->first].colorWriteMask != 0) { + skip |= + log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, SHADER_CHECKER_INPUT_NOT_PRODUCED, "SC", "Attachment %d not written by fragment shader", it_b->first); + } it_b++; } else { unsigned output_type = get_fundamental_type(fs, it_a->second.type_id); |
