summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index a8cb8a7bcfa..5de5f6815ab 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -2812,7 +2812,7 @@ update_texture_state( GLcontext *ctx )
* uniform sampler changes, so maybe there is a better place to perform these rather
* expensive computations.
*/
- if (prog != NULL) {
+ if (ctx->ShaderObjects._FragmentShaderPresent) {
(**prog).GetTextureImageUsage (prog, progteximageusage);
}
@@ -2829,7 +2829,7 @@ update_texture_state( GLcontext *ctx )
texUnit->_GenFlags = 0;
/* Get the bitmask of texture enables */
- if (prog != NULL) {
+ if (ctx->ShaderObjects._FragmentShaderPresent) {
enableBits = progteximageusage[unit];
}
else if (ctx->FragmentProgram._Enabled) {
@@ -2948,7 +2948,7 @@ update_texture_state( GLcontext *ctx )
/* Fragment programs may need texture coordinates but not the
* corresponding texture images.
*/
- if (prog != NULL) {
+ if (ctx->ShaderObjects.CurrentProgram != NULL) {
ctx->Texture._EnabledCoordUnits |= (1 << ctx->Const.MaxTextureCoordUnits) - 1;
}
else if (ctx->FragmentProgram._Enabled) {