Re: [Mesa-dev] [PATCH V2 1/2] i965/gen10: Don't set Smooth Point Enable in 3DSTATE_SF if num_samples > 1

2017-10-27 Thread Anuj Phogat
On Fri, Oct 27, 2017 at 4:00 PM, Kenneth Graunke  wrote:
> On Friday, October 27, 2017 3:17:20 PM PDT Anuj Phogat wrote:
>> V2: Use _NEW_BUFFERS in place of _NEW_MULTISAMPLE
>>
>> Signed-off-by: Anuj Phogat 
>> Cc: Kenneth Graunke 
>> ---
>>  src/mesa/drivers/dri/i965/genX_state_upload.c | 13 -
>>  1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c 
>> b/src/mesa/drivers/dri/i965/genX_state_upload.c
>> index 4ccfd48919..25240f01d9 100644
>> --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
>> +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
>> @@ -1626,6 +1626,16 @@ genX(upload_sf)(struct brw_context *brw)
>>   sf.SmoothPointEnable = true;
>>  #endif
>>
>> +#if GEN_GEN == 10
>> +  /* _NEW_BUFFERS
>> +   * Smooth Point Enable bit MUST not be set when NUM_MULTISAMPLES > 1.
>> +   */
>> +  const bool multisampled_fbo =
>> + _mesa_geometric_samples(ctx->DrawBuffer) > 1;
>> +  if (multisampled_fbo)
>> + sf.SmoothPointEnable = false;
>> +#endif
>> +
>>  #if GEN_IS_G4X || GEN_GEN >= 5
>>sf.AALineDistanceMode = AALINEDISTANCE_TRUE;
>>  #endif
>> @@ -1681,7 +1691,8 @@ static const struct brw_tracked_state genX(sf_state) = 
>> {
>> _NEW_POINT |
>> _NEW_PROGRAM |
>> (GEN_GEN >= 6 ? _NEW_MULTISAMPLE : 0) |
>> -   (GEN_GEN <= 7 ? _NEW_BUFFERS | _NEW_POLYGON : 0),
>> +   (GEN_GEN <= 7 ? _NEW_POLYGON : 0) |
>> +   (GEN_GEN <= 7 || GEN_GEN == 10 ? _NEW_BUFFERS : 0),
>
> Let's leave the GEN <= 7 bit as is and just add
>
> (GEN_GEN == 10 ? _NEW_BUFFERS : 0)
Done. Thanks.
>
> With that, both are
> Reviewed-by: Kenneth Graunke 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH V2 1/2] i965/gen10: Don't set Smooth Point Enable in 3DSTATE_SF if num_samples > 1

2017-10-27 Thread Kenneth Graunke
On Friday, October 27, 2017 3:17:20 PM PDT Anuj Phogat wrote:
> V2: Use _NEW_BUFFERS in place of _NEW_MULTISAMPLE
> 
> Signed-off-by: Anuj Phogat 
> Cc: Kenneth Graunke 
> ---
>  src/mesa/drivers/dri/i965/genX_state_upload.c | 13 -
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c 
> b/src/mesa/drivers/dri/i965/genX_state_upload.c
> index 4ccfd48919..25240f01d9 100644
> --- a/src/mesa/drivers/dri/i965/genX_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
> @@ -1626,6 +1626,16 @@ genX(upload_sf)(struct brw_context *brw)
>   sf.SmoothPointEnable = true;
>  #endif
>  
> +#if GEN_GEN == 10
> +  /* _NEW_BUFFERS
> +   * Smooth Point Enable bit MUST not be set when NUM_MULTISAMPLES > 1.
> +   */
> +  const bool multisampled_fbo =
> + _mesa_geometric_samples(ctx->DrawBuffer) > 1;
> +  if (multisampled_fbo)
> + sf.SmoothPointEnable = false;
> +#endif
> +
>  #if GEN_IS_G4X || GEN_GEN >= 5
>sf.AALineDistanceMode = AALINEDISTANCE_TRUE;
>  #endif
> @@ -1681,7 +1691,8 @@ static const struct brw_tracked_state genX(sf_state) = {
> _NEW_POINT |
> _NEW_PROGRAM |
> (GEN_GEN >= 6 ? _NEW_MULTISAMPLE : 0) |
> -   (GEN_GEN <= 7 ? _NEW_BUFFERS | _NEW_POLYGON : 0),
> +   (GEN_GEN <= 7 ? _NEW_POLYGON : 0) |
> +   (GEN_GEN <= 7 || GEN_GEN == 10 ? _NEW_BUFFERS : 0),

Let's leave the GEN <= 7 bit as is and just add

(GEN_GEN == 10 ? _NEW_BUFFERS : 0)

With that, both are
Reviewed-by: Kenneth Graunke 


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev