diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 0f94ac4d0e8..dcd35fd32b2 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -205,7 +205,8 @@ set_debug_flags(const char *str) { "flush", DEBUG_ALWAYS_FLUSH }, /* flush after each drawing command */ { "incomplete_tex", DEBUG_INCOMPLETE_TEXTURE }, { "incomplete_fbo", DEBUG_INCOMPLETE_FBO }, - { "context", DEBUG_CONTEXT } /* force set GL_CONTEXT_FLAG_DEBUG_BIT flag */ + { "context", DEBUG_CONTEXT }, /* force set GL_CONTEXT_FLAG_DEBUG_BIT flag */ + { "fallback_tex", DEBUG_FALLBACK_TEXTURE }, }; GLuint i; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 74c45221e7c..03a62ae4a91 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3680,7 +3680,8 @@ enum _debug DEBUG_ALWAYS_FLUSH = (1 << 1), DEBUG_INCOMPLETE_TEXTURE = (1 << 2), DEBUG_INCOMPLETE_FBO = (1 << 3), - DEBUG_CONTEXT = (1 << 4) + DEBUG_CONTEXT = (1 << 4), + DEBUG_FALLBACK_TEXTURE = (1 << 5), }; #ifdef __cplusplus diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index cee73edf273..9917d6730ad 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -704,6 +704,8 @@ update_single_program_texture(struct gl_context *ctx, struct gl_program *prog, * Mesa implements this by creating a hidden texture object with a pixel of * that value. */ + if (MESA_DEBUG_FLAGS & DEBUG_FALLBACK_TEXTURE) + _mesa_debug(NULL, "Using fallback texture for target %u\n", target_index); texObj = _mesa_get_fallback_texture(ctx, target_index, !!(prog->ShadowSamplers & BITFIELD_BIT(unit))); assert(texObj);