diff options
| author | scygan <slawomir.cygan@intel.com> | 2015-06-01 19:48:11 +0200 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2015-06-04 10:15:32 +1200 |
| commit | 703e1636183294cc94ef5061a834bcc4ec3c8368 (patch) | |
| tree | 6f824bfe96aa9742efab614cecb07ec666f3a0a4 /layers/shader_checker.cpp | |
| parent | abcc90de078e99824aede4a1bf56cef3924339e6 (diff) | |
| download | usermoji-703e1636183294cc94ef5061a834bcc4ec3c8368.tar.xz | |
ShaderChecker: do not crash if Shader output count == 0 and PSO attachments count > 0
(cherry picked from commit 80bb5d63774f2e11bc14d9c5291bb3273f0e79cf)
Diffstat (limited to 'layers/shader_checker.cpp')
| -rw-r--r-- | layers/shader_checker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/shader_checker.cpp b/layers/shader_checker.cpp index 8e08b372..0fa08126 100644 --- a/layers/shader_checker.cpp +++ b/layers/shader_checker.cpp @@ -715,7 +715,7 @@ validate_fs_outputs_against_cb(shader_source const *fs, VkPipelineCbStateCreateI */ while ((outputs.size() > 0 && it != outputs.end()) || attachment < cb->attachmentCount) { - if (attachment == cb->attachmentCount || it->first < attachment) { + if (attachment == cb->attachmentCount || ( it != outputs.end() && it->first < attachment)) { sprintf(str, "FS writes to output location %d with no matching attachment", it->first); layerCbMsg(VK_DBG_MSG_WARNING, VK_VALIDATION_LEVEL_0, NULL, 0, SHADER_CHECKER_OUTPUT_NOT_CONSUMED, "SC", str); it++; |
