summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ddebug
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-08-07 11:02:33 +0200
committerNicolai Hähnle <[email protected]>2017-08-22 09:53:35 +0200
commit635a930ad3c0415a2855a3d9b958d4f34304225f (patch)
tree26616913f43c35ee6f950a487fb19699a97afa4c /src/gallium/drivers/ddebug
parentf4c1d5a76d1eddc0b4097aaca4baad30a8500913 (diff)
ddebug: remove dd_draw_record::driver_state_log
It is no longer used. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ddebug')
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c57
-rw-r--r--src/gallium/drivers/ddebug/dd_pipe.h1
2 files changed, 0 insertions, 58 deletions
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 8a435a37fcb..aa38c561c57 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -945,7 +945,6 @@ dd_free_record(struct dd_draw_record **record)
u_log_page_destroy((*record)->log_page);
dd_unreference_copy_of_call(&(*record)->call);
dd_unreference_copy_of_draw_state(&(*record)->draw_state);
- FREE((*record)->driver_state_log);
FREE(*record);
*record = next;
}
@@ -965,7 +964,6 @@ dd_dump_record(struct dd_context *dctx, struct dd_draw_record *record,
(now - record->timestamp) / 1000);
dd_dump_call(f, &record->draw_state.base, &record->call);
- fprintf(f, "%s\n", record->driver_state_log);
fprintf(f,"\n\n**************************************************"
"***************************\n");
@@ -1035,71 +1033,17 @@ dd_thread_pipelined_hang_detect(void *input)
return 0;
}
-static char *
-dd_get_driver_shader_log(struct dd_context *dctx)
-{
-#if defined(PIPE_OS_LINUX)
- FILE *f;
- char *buf;
- int written_bytes;
-
- if (!dctx->max_log_buffer_size)
- dctx->max_log_buffer_size = 16 * 1024;
-
- /* Keep increasing the buffer size until there is enough space.
- *
- * open_memstream can resize automatically, but it's VERY SLOW.
- * fmemopen is much faster.
- */
- while (1) {
- buf = malloc(dctx->max_log_buffer_size);
- buf[0] = 0;
-
- f = fmemopen(buf, dctx->max_log_buffer_size, "a");
- if (!f) {
- free(buf);
- return NULL;
- }
-
- dd_dump_driver_state(dctx, f, PIPE_DUMP_CURRENT_SHADERS);
- written_bytes = ftell(f);
- fclose(f);
-
- /* Return if the backing buffer is large enough. */
- if (written_bytes < dctx->max_log_buffer_size - 1)
- break;
-
- /* Try again. */
- free(buf);
- dctx->max_log_buffer_size *= 2;
- }
-
- return buf;
-#else
- /* Return an empty string. */
- return (char*)calloc(1, 4);
-#endif
-}
-
static void
dd_pipelined_process_draw(struct dd_context *dctx, struct dd_call *call)
{
struct pipe_context *pipe = dctx->pipe;
struct dd_draw_record *record;
- char *log;
/* Make a record of the draw call. */
record = MALLOC_STRUCT(dd_draw_record);
if (!record)
return;
- /* Create the log. */
- log = dd_get_driver_shader_log(dctx);
- if (!log) {
- FREE(record);
- return;
- }
-
/* Update the fence with the GPU.
*
* radeonsi/clear_buffer waits in the command processor until shaders are
@@ -1112,7 +1056,6 @@ dd_pipelined_process_draw(struct dd_context *dctx, struct dd_call *call)
/* Initialize the record. */
record->timestamp = os_time_get();
record->sequence_no = dctx->sequence_no;
- record->driver_state_log = log;
record->log_page = u_log_new_page(&dctx->log);
memset(&record->call, 0, sizeof(record->call));
diff --git a/src/gallium/drivers/ddebug/dd_pipe.h b/src/gallium/drivers/ddebug/dd_pipe.h
index f89f3820b43..70b9ae8ae82 100644
--- a/src/gallium/drivers/ddebug/dd_pipe.h
+++ b/src/gallium/drivers/ddebug/dd_pipe.h
@@ -226,7 +226,6 @@ struct dd_draw_record {
struct dd_call call;
struct dd_draw_state_copy draw_state;
struct u_log_page *log_page;
- char *driver_state_log;
};
struct dd_context