<div dir="ltr">On 14 August 2013 18:55, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Currently, i965 uploads a single SAMPLER_STATE table shared across all<br>
shader stages (VS, FS). This series splits it out, uploading a unique<br>
table for each stage.<br>
<br>
I think this may actually fix some bugs with vertex texturing:<br>
Piglit's fragment-and-vertex-texturing uses two textures (unit 0 and<br>
unit 1), one in each shader. vs->SamplersUsed and fs->SamplersUsed<br>
both only have one bit set (bit 0), but vs->SamplerUnits and<br>
fs->SamplerUnits map them differently (units 0 and 1). The existing<br>
code would select fs->SamplerUnits[0], ignoring vs->SamplerUnits[0].<br>
If the two textures had, say, different wrap modes, this would probably<br>
illustrate the problem.<br>
<br>
It also just seems like a good idea. The border color code in particular<br>
is much nicer after this change, as it's not directly tied to brw->wm<br>
any longer (even though textures can be used in all shader stages).<br>
<br>
No observed Piglit changes on Ivybridge.<br></blockquote><div><br></div><div>Nice! I think this will make things easier for me in geometry shader land as well.<br><br></div><div>I sent a comment on patch 9. The rest are:<br>
<br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div><div><br></div><div>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.<br>
</div></div></div></div>