[Mesa-dev] updating tex combine for frag program
Dave Airlie
airlied at gmail.com
Tue Feb 7 23:23:02 PST 2012
On Tue, Feb 7, 2012 at 10:09 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 02/07/2012 12:08 PM, Dave Airlie wrote:
>>
>> Hi guys,
>>
>> Is there any reason we need to update tex combiner state if we are
>> using shaders?
>>
>> can we drop update_tex_combine updates to only the case where we don't
>> have a fragment shader/program unless its from the FF shader?
>
>
> I don't recall when update_tex_combine happens. Does it happen at draw-time
> or state change-time? If it happens at state change-time, the state will
> need to get updated when program 0 gets bound. Otherwise something like the
> following would break:
>
> glUseProgram(my_prog);
> glTexEnvi(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE,
> GL_DECAL);
> glUseProgram(0);
> glDrawArrays(...);
IT happens in update_texture_state which happens on _NEW_TEXTURE, so
it should be fine, since with the maintain fixed function stuff we
update the program on _NEW_TEXTURE.
Dave.
More information about the mesa-dev
mailing list