[Mesa-dev] [PATCH 3/3] mesa: Stop calling ProgramStringNotify when SamplerUnits changes.

Eric Anholt eric at anholt.net
Wed Jan 11 12:32:29 PST 2012


On Wed, 11 Jan 2012 01:55:46 -0800, Kenneth Graunke <kenneth at whitecape.org> wrote:
> This rather rudely told the driver the moral equivalent of "Your shader
> code changed in an unimaginable way---don't assume anything; recompile!"
> 
> The i965 driver used to rely on this in order to recompile the program
> when SamplerUnits changed.  It now properly listens to _NEW_PROGRAM and
> _NEW_TEXTURE, which this code flags, and does the right thing.
> 
> According to Marek, st/mesa doesn't need nor want a ProgramStringNotify
> here.  The classic radeon, r200, and nouveau drivers don't use the
> SamplerUnits array, so they should be unaffected.
> 
> (Unfortunately I think i915 may still rely on this :( Ian/Eric, can you
>  confirm or deny that?  It doesn't seem to have any of the program
>  caching, which seems rather horrible...)

Yes, it is horrible.  But this patch will break it -- it's relying on
i915ProgramStringNotify to trigger p->translated = 0 to do a recompile.
Minimally, i915_update_program() could set it to 0 until we do the
caching right.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120111/46607280/attachment.pgp>


More information about the mesa-dev mailing list