Xiang, Haihao wrote: > Hi, Brian > inst->TexSrcUnit is used as a sampler unit for a GLSL program since > the commit ade508312c701ce89d3c2cd717994dbbabb4f207, however it is still > used as a source texture unit for an internal program. So a DRI driver > (such as i965) doesn't know inst->TexSrcUnit is a sampler or texture > unit when it scans all tex instructions of the currently enabled and > valid program (internal program or compiled shader program). Is there > any flag to distinguish them?
Sorry for the slow reply, Haihao, I was on vacation last week. The intention is that TexSrcUnit should always be used as in index into the program->SamplerUnits[] array. For a fixed-function program, program->SamplerUnits[i] = i (an identity mapping). This default sampler-to-texture-unit mapping is set up in _mesa_init_program_struct(). For GLSL programs, calls to glUniformi() which set sampler variables will modify the program->SamplerUnits[] values. Does that help? -Brian ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev