[Mesa-dev] i965 CS state tracking
Chris Forbes
chrisf at ijw.co.nz
Wed Sep 3 12:30:27 PDT 2014
On Thu, Sep 4, 2014 at 7:20 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> I know that you can link together VS/GS/FS/HS/DS and CS together in a single GLSL linked program, and it just uses the 3D shaders or the compute shader depending whether you use glDraw* or glDispatchCompute. So, if you did that, we'd additionally emit the CS stage's binding table when doing 3D drawing, and the 3D binding tables when doing compute.
>
> I might be wrong, but presumably if you link together 3D and compute shaders into a single program like that, you intend to use them together - i.e., do compute, then do 3D drawing using the results, or vice versa. If I'm right about that, then the extra upload is not wasted - it's just done a little earlier.
Are you sure about this? I haven't looked at the SSO case in detail,
but the ARB_compute_shader spec says, and our linker enforces:
LinkProgram will fail if <program> contains a combination of compute and
non-compute shaders.
More information about the mesa-dev
mailing list