On Fri, Oct 16, 2015 at 1:22 PM, Samuel Pitoiset <samuel.pitoi...@gmail.com> wrote: > NOUVEAU_GETPARAM_GRAPH_UNITS param returns the number of GPCs, the total > number of TPCs and the number of ROP units. Note that when the DRM > version is too old the default number of GPCs is fixed to 4. > > This will be used to launch the compute kernel which is used to read MP > performance counters over all GPCs. > > Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> > --- > src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 + > src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c > b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c > index afd91e6..ba53d10 100644 > --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c > +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c > @@ -914,6 +914,7 @@ nvc0_screen_create(struct nouveau_device *dev) > else > value = (16 << 8) | 4; > } > + screen->gpc_count = value & 0x0000ffff;
gpc_count is a u8... I guess you wanted to make this &0xff? Doesn't *really* matter in practice, but a bit confusing. > screen->mp_count = value >> 8; > screen->mp_count_compute = screen->mp_count; > > diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h > b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h > index 8cf7560..857eb03 100644 > --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h > +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.h > @@ -67,6 +67,7 @@ struct nvc0_screen { > struct nouveau_bo *txc; /* TIC (offset 0) and TSC (65536) */ > struct nouveau_bo *poly_cache; > > + uint8_t gpc_count; > uint16_t mp_count; > uint16_t mp_count_compute; /* magic reg can make compute use fewer MPs */ > > -- > 2.6.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev