st/mesa: print TCS/TES/GS/CS TGSI in the right place & keep disk cache enabled
authorMarek Olšák <marek.olsak@amd.com>
Sat, 9 Nov 2019 00:35:02 +0000 (19:35 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 12 Nov 2019 00:45:08 +0000 (19:45 -0500)
The old place only printed on a disk cache miss, which is why the disk
cache was disabled.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_program.c

index 0a473f2d3277fddee804d4c02bcd8ccdb957388b..817a75da780c85e0f698f72c9ad5c1eff27c0b29 100644 (file)
@@ -960,8 +960,7 @@ st_create_context(gl_api api, struct pipe_context *pipe,
 
    st_debug_init();
 
-   if (pipe->screen->get_disk_shader_cache &&
-       !(ST_DEBUG & DEBUG_PRINT_IR))
+   if (pipe->screen->get_disk_shader_cache)
       ctx->Cache = pipe->screen->get_disk_shader_cache(pipe->screen);
 
    /* XXX: need a capability bit in gallium to query if the pipe
index c37799a2ff44cfce52d03cb9b1532a0f9dfef9da..41508710783e862bc48ba7011073b71e19411f48 100644 (file)
@@ -1728,9 +1728,6 @@ st_translate_common_program(struct st_context *st,
    if (ST_DEBUG & DEBUG_PRINT_IR && ST_DEBUG & DEBUG_MESA)
       _mesa_print_program(prog);
 
-   if (ST_DEBUG & DEBUG_PRINT_IR)
-      tgsi_dump(stcp->state.tokens, 0);
-
    free_glsl_to_tgsi_visitor(stcp->glsl_to_tgsi);
    stcp->glsl_to_tgsi = NULL;
    return true;
@@ -1795,7 +1792,10 @@ st_get_common_variant(struct st_context *st,
 
                prog->state.tokens = tokens;
             }
-           state = prog->state;
+            state = prog->state;
+
+            if (ST_DEBUG & DEBUG_PRINT_IR)
+               tgsi_dump(state.tokens, 0);
          }
          /* fill in new variant */
          switch (prog->Base.info.stage) {