<div dir="ltr"><div><div>Seems reasonable<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div>Cc: "17.0 13.0" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 18, 2017 at 4:20 AM, Randy Xu <span dir="ltr"><<a href="mailto:randy.xu@intel.com" target="_blank">randy.xu@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: "Xu,Randy" <<a href="mailto:randy.xu@intel.com">randy.xu@intel.com</a>><br>
<br>
The crash is due to NULL pColorBlendState, which is legal if the<br>
pipeline has rasterization disabled or if the subpass of the render pass<br>
the pipeline is created against does not use any color attachments.<br>
<br>
Test: Sample subpasses from LunarG can run without crash<br>
<br>
Signed-off-by: Xu,Randy <<a href="mailto:randy.xu@intel.com">randy.xu@intel.com</a>><br>
---<br>
src/intel/vulkan/genX_<wbr>pipeline.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/genX_<wbr>pipeline.c b/src/intel/vulkan/genX_<wbr>pipeline.c<br>
index cfc7c06..85a9e4f 100644<br>
--- a/src/intel/vulkan/genX_<wbr>pipeline.c<br>
+++ b/src/intel/vulkan/genX_<wbr>pipeline.c<br>
@@ -902,7 +902,7 @@ emit_cb_state(struct anv_pipeline *pipeline,<br>
/* We can have at most 8 attachments */<br>
assert(i < 8);<br>
<br>
- if (binding->index >= info->attachmentCount)<br>
+ if (info == NULL || binding->index >= info->attachmentCount)<br>
continue;<br>
<br>
assert(binding->binding == 0);<br>
@@ -1423,7 +1423,7 @@ emit_3dstate_ps(struct anv_pipeline *pipeline,<br>
* source blend factors.<br>
*/<br>
bool dual_src_blend = false;<br>
- if (wm_prog_data->dual_src_blend) {<br>
+ if (wm_prog_data->dual_src_blend && blend) {<br>
for (uint32_t i = 0; i < blend->attachmentCount; i++) {<br>
const VkPipelineColorBlendAttachment<wbr>State *bstate =<br>
&blend->pAttachments[i];<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<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>
</font></span></blockquote></div><br></div>