diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-06-21 10:28:30 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-06-21 13:53:15 -0600 |
| commit | 5235884f707f997ed352b692af3e4f6b57f8739a (patch) | |
| tree | e2e14ebdfad9e3c9d16968252997ce5ceecdc5f6 /layers/core_validation.cpp | |
| parent | 5f67d65631e64c1dc22012fb72a42048e59bc69a (diff) | |
| download | usermoji-5235884f707f997ed352b692af3e4f6b57f8739a.tar.xz | |
layers: GH669, Fix clearValueCount errors
Validation was assuming LOAD_OP_CLEAR for some attachments resulting
in bad validation messages.
Change-Id: I8ff75ca63f591e3002b1ee2b61a6844d0cf1c07d
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index b0b8515f..3d76a9f4 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -8990,11 +8990,14 @@ static bool VerifyRenderAreaBounds(const layer_data *my_data, const VkRenderPass // [load|store]Op flag must be checked // TODO: The memory valid flag in DEVICE_MEM_INFO should probably be split to track the validity of stencil memory separately. template <typename T> static bool FormatSpecificLoadAndStoreOpSettings(VkFormat format, T color_depth_op, T stencil_op, T op) { + if (color_depth_op != op && stencil_op != op) { + return false; + } bool check_color_depth_load_op = !vk_format_is_stencil_only(format); bool check_stencil_load_op = vk_format_is_depth_and_stencil(format) || !check_color_depth_load_op; - // For now, having either the color/depth op OR the stencil op will make the memory valid. They may need to be tracked separately - bool failed = ((check_stencil_load_op && (stencil_op != op)) && (check_color_depth_load_op && (color_depth_op != op))); - return !failed; + + return (((check_color_depth_load_op == true) && (color_depth_op == op)) || + ((check_stencil_load_op == true) && (stencil_op == op))); } VKAPI_ATTR void VKAPI_CALL |
