[Mesa-dev] [PATCH 00/10] i965: Separate VS/FS sampler tables.

Paul Berry stereotype441 at gmail.com
Thu Aug 15 22:56:53 PDT 2013


On 14 August 2013 18:55, Kenneth Graunke <kenneth at whitecape.org> wrote:

> Currently, i965 uploads a single SAMPLER_STATE table shared across all
> shader stages (VS, FS).  This series splits it out, uploading a unique
> table for each stage.
>
> I think this may actually fix some bugs with vertex texturing:
> Piglit's fragment-and-vertex-texturing uses two textures (unit 0 and
> unit 1), one in each shader.  vs->SamplersUsed and fs->SamplersUsed
> both only have one bit set (bit 0), but vs->SamplerUnits and
> fs->SamplerUnits map them differently (units 0 and 1).  The existing
> code would select fs->SamplerUnits[0], ignoring vs->SamplerUnits[0].
> If the two textures had, say, different wrap modes, this would probably
> illustrate the problem.
>
> It also just seems like a good idea.  The border color code in particular
> is much nicer after this change, as it's not directly tied to brw->wm
> any longer (even though textures can be used in all shader stages).
>
> No observed Piglit changes on Ivybridge.
>

Nice!  I think this will make things easier for me in geometry shader land
as well.

I sent a comment on patch 9.  The rest are:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>

Possible follow-up idea: ctx->vs and ctx->fs now have a lot of elements in
common: scratch_bo, const_bo, prog_offset, state_offset, push_const_offset,
bind_bo_offset, surf_offset, sampler_count, sampler_offset, and
sdc_offset.  Let's put those in their own struct, and then we can pass a
pointer to that struct to upload_sampler_state_table virtual function.  I
might should try doing that as part of my upcoming geometry shader back-end
series.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130815/eb8fa0b8/attachment.html>


More information about the mesa-dev mailing list