Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: Fix Pipeline dynamic rasterization discard logic #206

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions src/vulkan/vk_safe_struct_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,8 @@ safe_VkGraphicsPipelineCreateInfo::safe_VkGraphicsPipelineCreateInfo(const VkGra
if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)
is_dynamic_has_rasterization = true;
}
const bool has_rasterization = in_struct->pRasterizationState
? (is_dynamic_has_rasterization || !in_struct->pRasterizationState->rasterizerDiscardEnable)
: false;
const bool has_rasterization = is_dynamic_has_rasterization ||
(in_struct->pRasterizationState && !in_struct->pRasterizationState->rasterizerDiscardEnable);
if (in_struct->pViewportState && (has_rasterization || is_graphics_library)) {
bool is_dynamic_viewports = false;
bool is_dynamic_scissors = false;
Expand Down Expand Up @@ -957,9 +956,8 @@ safe_VkGraphicsPipelineCreateInfo::safe_VkGraphicsPipelineCreateInfo(const safe_
if (copy_src.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)
is_dynamic_has_rasterization = true;
}
const bool has_rasterization = copy_src.pRasterizationState
? (is_dynamic_has_rasterization || !copy_src.pRasterizationState->rasterizerDiscardEnable)
: false;
const bool has_rasterization =
is_dynamic_has_rasterization || (copy_src.pRasterizationState && !copy_src.pRasterizationState->rasterizerDiscardEnable);
if (copy_src.pViewportState && (has_rasterization || is_graphics_library)) {
pViewportState = new safe_VkPipelineViewportStateCreateInfo(*copy_src.pViewportState);
} else
Expand Down Expand Up @@ -1052,9 +1050,8 @@ safe_VkGraphicsPipelineCreateInfo& safe_VkGraphicsPipelineCreateInfo::operator=(
if (copy_src.pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)
is_dynamic_has_rasterization = true;
}
const bool has_rasterization = copy_src.pRasterizationState
? (is_dynamic_has_rasterization || !copy_src.pRasterizationState->rasterizerDiscardEnable)
: false;
const bool has_rasterization =
is_dynamic_has_rasterization || (copy_src.pRasterizationState && !copy_src.pRasterizationState->rasterizerDiscardEnable);
if (copy_src.pViewportState && (has_rasterization || is_graphics_library)) {
pViewportState = new safe_VkPipelineViewportStateCreateInfo(*copy_src.pViewportState);
} else
Expand Down Expand Up @@ -1163,9 +1160,8 @@ void safe_VkGraphicsPipelineCreateInfo::initialize(const VkGraphicsPipelineCreat
if (in_struct->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)
is_dynamic_has_rasterization = true;
}
const bool has_rasterization = in_struct->pRasterizationState
? (is_dynamic_has_rasterization || !in_struct->pRasterizationState->rasterizerDiscardEnable)
: false;
const bool has_rasterization = is_dynamic_has_rasterization ||
(in_struct->pRasterizationState && !in_struct->pRasterizationState->rasterizerDiscardEnable);
if (in_struct->pViewportState && (has_rasterization || is_graphics_library)) {
bool is_dynamic_viewports = false;
bool is_dynamic_scissors = false;
Expand Down Expand Up @@ -1256,9 +1252,8 @@ void safe_VkGraphicsPipelineCreateInfo::initialize(const safe_VkGraphicsPipeline
if (copy_src->pDynamicState->pDynamicStates[i] == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT)
is_dynamic_has_rasterization = true;
}
const bool has_rasterization = copy_src->pRasterizationState
? (is_dynamic_has_rasterization || !copy_src->pRasterizationState->rasterizerDiscardEnable)
: false;
const bool has_rasterization =
is_dynamic_has_rasterization || (copy_src->pRasterizationState && !copy_src->pRasterizationState->rasterizerDiscardEnable);
if (copy_src->pViewportState && (has_rasterization || is_graphics_library)) {
pViewportState = new safe_VkPipelineViewportStateCreateInfo(*copy_src->pViewportState);
} else
Expand Down
Loading