[Mesa-dev] [PATCH] gallium: add pipe_grid_info::partial_block

Marek Olšák maraeo at gmail.com
Wed Jan 9 00:25:50 UTC 2019


On Tue, Jan 8, 2019 at 7:18 PM Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> On Tue, Jan 8, 2019 at 6:21 PM Marek Olšák <maraeo at gmail.com> wrote:
> >
> > On Tue, Jan 8, 2019 at 5:25 PM Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> >>
> >> Why does this need to be in p_state? And who is responsible for
> >> setting it (and how will it be set)?
> >
> >
> > Oh right, there is a way to get it out of p_state.h if needed.
> >
> > It should be set to 0 by default.
> >
> > If your thread block is 8x8x1, but you need to launch 10x8x1 threads,
> set partial_block = {2, 0, 0}. It will launch the following thread blocks:
> > 8x8x1
> > 2x8x1
> >
> > It's the same as launching 16x8x1 threads and doing this at the
> beginning of the compute shader:
> >   if (globalThreadID.x >= 10) return;
>
> But that all sounds like something a state tracker wouldn't care
> about, right? In e.g. GLSL you can specify the block to be 10x8x1 and
> let the backend work it all out. Should st/mesa care about this (or
> clover or whatever)?
>

The block size should be a multiple of 64 on radeonsi to utilize all SIMD
lanes. If you want to launch 8192+1 threads with the block size of 64, you
need to launch 1 partial block with the block size of 1 at the end. OpenGL
can't do this.

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190108/8cdd3017/attachment.html>


More information about the mesa-dev mailing list