[Mesa-dev] [PATCH] nvc0: do not invalidate compute constbufs on Kepler

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon May 23 15:55:25 UTC 2016



On 05/22/2016 08:39 PM, Ilia Mirkin wrote:
> Seems reasonable. I assume you tested some draw/compute interop deqp
> tests on kepler to make sure it didn't start failing?

Just tested, no regressions with both piglit and deqp.
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
> On Sun, May 22, 2016 at 2:27 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> Constbufs are only aliased on Fermi and this will reduce the number of
>> flushes when we switch between 3d and compute.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>  src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
>> index 7a9abe5..a77486d 100644
>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
>> @@ -486,10 +486,12 @@ nvc0_constbufs_validate(struct nvc0_context *nvc0)
>>        }
>>     }
>>
>> -   /* Invalidate all COMPUTE constbufs because they are aliased with 3D. */
>> -   nvc0->dirty_cp |= NVC0_NEW_CP_CONSTBUF;
>> -   nvc0->constbuf_dirty[5] |= nvc0->constbuf_valid[5];
>> -   nvc0->state.uniform_buffer_bound[5] = 0;
>> +   if (nvc0->screen->base.class_3d < NVE4_3D_CLASS) {
>> +      /* Invalidate all COMPUTE constbufs because they are aliased with 3D. */
>> +      nvc0->dirty_cp |= NVC0_NEW_CP_CONSTBUF;
>> +      nvc0->constbuf_dirty[5] |= nvc0->constbuf_valid[5];
>> +      nvc0->state.uniform_buffer_bound[5] = 0;
>> +   }
>>  }
>>
>>  static void
>> --
>> 2.8.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

-- 
-Samuel


More information about the mesa-dev mailing list