[Mesa-dev] [PATCH 09/13] i965: Use a single binding table for all pipeline stages.
kenneth at whitecape.org
Wed Nov 9 13:22:23 PST 2011
On 11/09/2011 10:34 AM, Eric Anholt wrote:
> On Tue, 8 Nov 2011 14:32:08 -0800, Kenneth Graunke<kenneth at whitecape.org> wrote:
>> Although the hardware supports separate binding tables for each pipeline
>> stage, we don't see much advantage over a single shared table.
>> Consider the contents of the binding table:
>> - Textures (16)
>> - Draw buffers (8)
>> - Pull constant buffers (1 for VS, 1 for WM)
>> OpenGL's texture bindings are global: the same set of textures is
>> available to all shader targets. So our binding table entries for
>> textures would be exactly the same in every table.
>> There are only two pull constant buffers (not many), and although draw
>> buffers aren't interesting to the VS, it shouldn't hurt to have them in
>> the table. The hardware supports up to 254 binding table entries, and
>> we currently only use 26.
>> Signed-off-by: Kenneth Graunke<kenneth at whitecape.org>
>> + brw->state.dirty.brw |= BRW_NEW_VS_BINDING_TABLE;
>> brw->state.dirty.brw |= BRW_NEW_PS_BINDING_TABLE;
> I was surprised you didn't fold these two state flags together, but I
> guess it leaves us flexibility if we decide to go back on this later.
I meant to, actually, I just forgot. I wanted to do it in a separate
patch though, since this one was already complicated enough. I'll have
to make one and send it out. Thanks!
More information about the mesa-dev