Skip to content

Commit 207314b

Browse files
layers: Fix crash in shader objects
1 parent 0ca8449 commit 207314b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layers/core_checks/cc_cmd_buffer_dynamic.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,9 @@ bool CoreChecks::ValidateDrawDynamicStateShaderObject(const LastBound& last_boun
15151515

15161516
if (fragment_shader_bound) {
15171517
if (!cb_state.dynamic_state_value.rasterizer_discard_enable) {
1518-
const uint32_t attachment_count = cb_state.activeRenderPass->GetDynamicRenderingColorAttachmentCount();
1518+
// TODO - Add test to understand when this would be a null render pass
1519+
const uint32_t attachment_count =
1520+
cb_state.activeRenderPass ? cb_state.activeRenderPass->GetDynamicRenderingColorAttachmentCount() : 0;
15191521
if (attachment_count > 0) {
15201522
skip |= ValidateDynamicStateIsSet(cb_state.dynamic_state_status.cb, CB_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT,
15211523
cb_state, objlist, loc, vuid.set_color_blend_enable_08657);

0 commit comments

Comments
 (0)