<p dir="ltr">Sends reasonable. Rb</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Oct 11, 2016 5:17 PM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Many of these can be "NULL if the pipeline has rasterization disabled."<br>
Also, we should assert that pMultisampleState exists.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/intel/vulkan/anv_pipeline.<wbr>c | 16 +++++++++-------<br>
1 file changed, 9 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>pipeline.c b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
index f96fe22..6b393a6 100644<br>
--- a/src/intel/vulkan/anv_<wbr>pipeline.c<br>
+++ b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
@@ -953,8 +953,7 @@ anv_pipeline_validate_create_<wbr>info(const VkGraphicsPipelineCreateInfo *info)<br>
struct anv_subpass *subpass = NULL;<br>
<br>
/* Assert that all required members of VkGraphicsPipelineCreateInfo are<br>
- * present, as explained by the Vulkan (20 Oct 2015, git-aa308cb), Section<br>
- * 4.2 Graphics Pipeline.<br>
+ * present. See the Vulkan 1.0.28 spec, Section 9.2 Graphics Pipelines.<br>
*/<br>
assert(info->sType == VK_STRUCTURE_TYPE_GRAPHICS_<wbr>PIPELINE_CREATE_INFO);<br>
<br>
@@ -969,14 +968,17 @@ anv_pipeline_validate_create_<wbr>info(const VkGraphicsPipelineCreateInfo *info)<br>
assert(info->stageCount >= 1);<br>
assert(info-><wbr>pVertexInputState);<br>
assert(info-><wbr>pInputAssemblyState);<br>
- assert(info->pViewportState);<br>
assert(info-><wbr>pRasterizationState);<br>
+ if (!info->pRasterizationState-><wbr>rasterizerDiscardEnable) {<br>
+ assert(info->pViewportState);<br>
+ assert(info-><wbr>pMultisampleState);<br>
<br>
- if (subpass && subpass->depth_stencil_<wbr>attachment != VK_ATTACHMENT_UNUSED)<br>
- assert(info-><wbr>pDepthStencilState);<br>
+ if (subpass && subpass->depth_stencil_<wbr>attachment != VK_ATTACHMENT_UNUSED)<br>
+ assert(info-><wbr>pDepthStencilState);<br>
<br>
- if (subpass && subpass->color_count > 0)<br>
- assert(info->pColorBlendState)<wbr>;<br>
+ if (subpass && subpass->color_count > 0)<br>
+ assert(info->pColorBlendState)<wbr>;<br>
+ }<br>
<br>
for (uint32_t i = 0; i < info->stageCount; ++i) {<br>
switch (info->pStages[i].stage) {<br>
--<br>
2.10.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>