<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 23, 2018 at 8:54 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-8715688295021049877HOEnZb"><div class="m_-8715688295021049877h5">On Fri, Mar 23, 2018 at 8:51 PM, Marek Olšák <<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>> wrote:<br>
> diff --git a/src/gallium/include/pipe/p_s<wbr>tate.h<br>
> b/src/gallium/include/pipe/p_s<wbr>tate.h<br>
>><br>
>> index 4dce399f84..913a79faee 100644<br>
>> --- a/src/gallium/include/pipe/p_s<wbr>tate.h<br>
>> +++ b/src/gallium/include/pipe/p_s<wbr>tate.h<br>
>> @@ -113,6 +113,7 @@ struct pipe_rasterizer_state<br>
>> unsigned line_smooth:1;<br>
>> unsigned line_stipple_enable:1;<br>
>> unsigned line_last_pixel:1;<br>
>> + unsigned conservative_raster_mode:2; /**< PIPE_CONSERVATIVE_RASTER_x<br>
>> */<br>
>><br>
>> /**<br>
>> * Use the first vertex of a primitive as the provoking vertex for<br>
>> @@ -186,6 +187,7 @@ struct pipe_rasterizer_state<br>
>> float offset_units;<br>
>> float offset_scale;<br>
>> float offset_clamp;<br>
>> + float conservative_raster_dilate;<br>
>> };<br>
>><br>
>><br>
>> @@ -199,6 +201,10 @@ struct pipe_viewport_state<br>
>> {<br>
>> float scale[3];<br>
>> float translate[3];<br>
>> + /*<br>
>> + * Conservative rasterization subpixel precision bias in bits<br>
>> + */<br>
>> + uint16_t subpixel_precision[2];<br>
><br>
><br>
> Actually, there is one thing that I disagree with. pipe_viewport_state is<br>
> per-viewport and there are up to 16 viewports, but the extensions don't<br>
> allow per-viewport settings of subpixel_precision. The obvious thing to do<br>
> is to add a new pipe_context function that only sets subpixel_precision, but<br>
> how about this:<br>
><br>
> Would it be possible to move all the new states into a new CSO:<br>
> pipe_conservative_raster_state<wbr>?<br>
<br>
</div></div>FWIW the hardware does support this per viewport. But you're right -<br>
that level of detail is not exposed in GL. I think gallium tends to be<br>
closer to the hw, but I'd be fine with moving this out if you're<br>
concerned about context/etc size.<br>
</blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Yeah, it could be uint8_t subpixel_precision[16] in the new CSO in the future, but I don't see a reason for it to be 16x now when no code uses it. uint8_t seems enough for 2 4-bit values since nvc0 only allows values between 0 and 8.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Marek<br></div></div>