<div dir="ltr">On 29 October 2013 17:16, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Oct 29, 2013 at 4:31 PM, Paul Berry <span dir="ltr"><<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>></span> wrote:</div>
</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I think the right thing to do is to add:<br><br></div><div>if (dispatch_width == 16)<br></div><div>    fail("...");<br><br></div><div>to whatever parts of the visitor you aren't confident will work properly in SIMD16.</div>



</div></div></div></blockquote></div><div>Yes. But that only covers the per sample shading enabled due to gl_SampleID and gl_SamplePosition. </div><div><br></div><div>It still doesn't cover the case when there's no  gl_SampleID or  gl_SamplePosition in fragment shader but GL_SAMPLE_SHADING is enabled.</div>



<div>To disable simd16 for this case I either need to keep the relevant changes I made in gen7_wm_state.c </div><div>or</div><div>may be set  simd16_instructions = null in brw_wm_fs_emit() when GL_SAMPLE_SHADING is enabled. It should also be safe to call _mesa_get_min_invocations_per_fragment() in brw_wm_fs_emit(). So, we can take care of all the cases of sample shading enabled at the same place?</div>
</div></div></div></blockquote><div><br></div><div>Oh, I didn't realize that you were getting hangs with SIMD16 mode even when neither gl_SampleID nor gl_SamplePosition is used.<br><br></div><div>A large part of the reason I had suggested putting calls to fail() in brw_fs_visitor was because I thought the hangs were due to improper code generation.  Since you're getting hangs just by using GL_SAMPLE_SHADING, the cause mustn't be improper code generation, so my idea of failing out of SIMD16 compilation doesn't make sense anymore.  Based on this information I guess I'm ok with the patch as originally written.</div>
</div></div></div>