mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
update_texture_state() updated for new shaders
This commit is contained in:
parent
439758353a
commit
602045fd7b
1 changed files with 10 additions and 29 deletions
|
|
@ -2920,13 +2920,6 @@ update_texture_state( GLcontext *ctx )
|
|||
{
|
||||
GLuint unit;
|
||||
|
||||
#if 0 /** XXX NEW_SLANG */
|
||||
#if FEATURE_ARB_fragment_shader
|
||||
struct gl2_program_intf **prog = ctx->ShaderObjects.CurrentProgram;
|
||||
GLbitfield progteximageusage[MAX_TEXTURE_IMAGE_UNITS];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ctx->NewState |= _NEW_TEXTURE; /* TODO: only set this if there are
|
||||
* actual changes.
|
||||
*/
|
||||
|
|
@ -2936,19 +2929,6 @@ update_texture_state( GLcontext *ctx )
|
|||
ctx->Texture._TexMatEnabled = 0;
|
||||
ctx->Texture._TexGenEnabled = 0;
|
||||
|
||||
#if 00 /* XXX NEW_SLANG */
|
||||
#if FEATURE_ARB_fragment_shader
|
||||
/*
|
||||
* Grab texture image usage state from shader program. It must be
|
||||
* grabbed every time uniform sampler changes, so maybe there is a
|
||||
* better place to perform these rather expensive computations.
|
||||
*/
|
||||
if (ctx->ShaderObjects._FragmentShaderPresent) {
|
||||
(**prog).GetTextureImageUsage (prog, progteximageusage);
|
||||
}
|
||||
#endif /* FEATURE_ARB_fragment_shader */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Update texture unit state.
|
||||
*/
|
||||
|
|
@ -2960,16 +2940,17 @@ update_texture_state( GLcontext *ctx )
|
|||
texUnit->_ReallyEnabled = 0;
|
||||
texUnit->_GenFlags = 0;
|
||||
|
||||
/* Get the bitmask of texture enables */
|
||||
#if 000 /* XXX NEW_SLANG */
|
||||
#if FEATURE_ARB_fragment_shader
|
||||
if (ctx->ShaderObjects._FragmentShaderPresent) {
|
||||
enableBits = progteximageusage[unit];
|
||||
/* Get the bitmask of texture enables.
|
||||
* enableBits will be a mask of the TEXTURE_*_BIT flags indicating
|
||||
* which texture targets are enabled (fixed function) or referenced
|
||||
* by a fragment shader/program. When multiple flags are set, we'll
|
||||
* settle on the one with highest priority (see texture_override below).
|
||||
*/
|
||||
if (ctx->Shader.CurrentProgram &&
|
||||
ctx->Shader.CurrentProgram->LinkStatus) {
|
||||
enableBits = ctx->Shader.CurrentProgram->FragmentProgram->TexturesUsed[unit];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
if (ctx->FragmentProgram._Enabled) {
|
||||
else if (ctx->FragmentProgram._Enabled) {
|
||||
enableBits = ctx->FragmentProgram.Current->TexturesUsed[unit];
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue