<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 5, 2016 at 9:51 AM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Aug 04, 2016 at 08:07:08PM -0700, Jason Ekstrand wrote:<br>
> Drp... There's more work to do here to get the behavior 100% correct on<br>
> gen7 but this fixes a bug and is a step in the right direction.<br>
><br>
<br>
</span>You're right. To be more accurate, I'll rename the commit title to:<br>
"anv/gen7_pipeline: Set PixelShaderKillPixel for discards"<br>
<br>
> Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
<br>
Thanks for the review!<br>
<span class=""><br>
><br>
> Unfortunately, gen7 is a bit crazy so the simple solution doesn't cover all<br>
> the cases. For the full fix take a look at<br>
><br>
> <a href="https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/gen7_wm_state.c#n74" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/<wbr>mesa/mesa/tree/src/mesa/<wbr>drivers/dri/i965/gen7_wm_<wbr>state.c#n74</a><br>
<br>
</span>It'd probably be good for me to totally hook up this field while I'm in<br>
the area, so I'll put it on my TODO (though I'm fine with anyone picking<br>
this up). I'd send out a v2 which does this, but I would need to spend a<br>
decent amount of time ramping up on all the interactions with this<br>
field.<br>
<br>
><br>
> and<br>
><br>
> <a href="https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/gen7_wm_state.c#n81" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/<wbr>mesa/mesa/tree/src/mesa/<wbr>drivers/dri/i965/gen7_wm_<wbr>state.c#n81</a><br>
<br>
This condition seems strange. The docs seem to say:<br>
if (GEN7_WM_DISPATCH_ENABLE == 0)<br>
GEN7_WM_KILL_ENABLE = 0;<br>
<br>
but i965 does:<br>
if (GEN7_WM_KILL_ENABLE == 1)<br>
GEN7_WM_DISPATCH_ENABLE = 1;<br>
<br>
><br>
> and maybe<br>
><br>
> <a href="https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/gen7_wm_state.c#n119" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/<wbr>mesa/mesa/tree/src/mesa/<wbr>drivers/dri/i965/gen7_wm_<wbr>state.c#n119</a><br>
<br>
I don't understand how this field is related.<br></blockquote><div><br></div><div>I'm not sure it is actually related. We do need to make sure we're setting it correctly, but we can do that later.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
- Nanley<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> --Jason<br>
><br>
> On Aug 4, 2016 4:45 PM, "Nanley Chery" <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br>
><br>
> > According to the IVB PRM Vol2 P1, this bit must be set if a pixel shader<br>
> > contains a discard instruction.<br>
> ><br>
> > Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=97207" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=97207</a><br>
> > Cc: "12.0" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
> > Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> > ---<br>
> > src/intel/vulkan/gen7_<wbr>pipeline.c | 1 +<br>
> > 1 file changed, 1 insertion(+)<br>
> ><br>
> > diff --git a/src/intel/vulkan/gen7_<wbr>pipeline.c b/src/intel/vulkan/gen7_<br>
> > pipeline.c<br>
> > index 8ce50be..d1b18e0 100644<br>
> > --- a/src/intel/vulkan/gen7_<wbr>pipeline.c<br>
> > +++ b/src/intel/vulkan/gen7_<wbr>pipeline.c<br>
> > @@ -297,6 +297,7 @@ genX(graphics_pipeline_create)<wbr>(<br>
> > wm.<wbr>LineEndCapAntialiasingRegionWi<wbr>dth = 0; /* 0.5 pixels */<br>
> > wm.LineAntialiasingRegionWidth = 1; /* 1.0 pixels */<br>
> > wm.PointRasterizationRule = RASTRULE_UPPER_RIGHT;<br>
> > + wm.PixelShaderKillPixel = wm_prog_data->uses_kill;<br>
> > wm.<wbr>PixelShaderComputedDepthMode =<br>
> > wm_prog_data->computed_depth_<wbr>mode;<br>
> > wm.PixelShaderUsesSourceDepth =<br>
> > wm_prog_data->uses_src_depth;<br>
> > wm.PixelShaderUsesSourceW =<br>
> > wm_prog_data->uses_src_w;<br>
> > --<br>
> > 2.9.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>
> ><br>
</div></div></blockquote></div><br></div></div>