Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/compiler/glsl/glsl_parser_extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
add_builtin_defines, state, ctx);
}

#ifdef JUICE_MESA_DUMP_SHADERS
/* Write post-processed shader to c:\temp for debugging */
if (!state->error && source) {
char filename[512];
Expand All @@ -2266,6 +2267,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
fclose(fp);
}
}
#endif

/* Now that we have run the preprocessor we can check the shader cache and
* skip compilation if possible for those shaders that contained a shader
Expand Down
7 changes: 6 additions & 1 deletion src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ void _mesa_dump_spirv_hook(const char *stage_name, const void *spirv_data, size_
void _mesa_dump_nir_hook(const char *stage_name, struct nir_shader *nir);

/* Global flag to enable SPIRV dumping */
static bool spirv_dumping_enabled = true;
static bool spirv_dumping_enabled =
#ifdef JUICE_MESA_DUMP_SHADERS
true;
#else
false;
#endif

/* Function to enable/disable SPIRV dumping - called from Mesa */
void
Expand Down
2 changes: 2 additions & 0 deletions src/mesa/main/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,11 +1901,13 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,

ctx->Driver.DrawGallium(ctx, &info, 0, &draw, 1);

#ifdef JUICE_MESA_DUMP_DRAW_STATE
/* Dump comprehensive state after draw if enabled */
dump_comprehensive_state(ctx, mode, start, count, numInstances, baseInstance);

/* Reset the uniform buffer update flag */
ctx->_UniformBufferDataUpdated = false;
#endif

if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
_mesa_flush(ctx);
Expand Down
Loading