Home | History | Annotate | Download | only in ddebug

Lines Matching refs:dctx

468 dd_dump_driver_state(struct dd_context *dctx, FILE *f, unsigned flags)
470 if (dctx->pipe->dump_debug_state) {
474 dctx->pipe->dump_debug_state(dctx->pipe, f, flags);
517 dd_write_report(struct dd_context *dctx, struct dd_call *call, unsigned flags,
520 FILE *f = dd_get_file_stream(dd_screen(dctx->base.screen),
521 dctx->draw_state.apitrace_call_number);
526 dd_dump_call(f, &dctx->draw_state, call);
527 dd_dump_driver_state(dctx, f, flags);
544 dd_flush_and_check_hang(struct dd_context *dctx,
549 struct pipe_context *pipe = dctx->pipe;
551 uint64_t timeout_ms = dd_screen(dctx->base.screen)->timeout_ms;
570 dd_flush_and_handle_hang(struct dd_context *dctx,
574 if (dd_flush_and_check_hang(dctx, fence, flags)) {
575 FILE *f = dd_get_file_stream(dd_screen(dctx->base.screen),
576 dctx->draw_state.apitrace_call_number);
580 dd_dump_driver_state(dctx, f,
880 dd_dump_record(struct dd_context *dctx, struct dd_draw_record *record,
883 FILE *f = dd_get_file_stream(dd_screen(dctx->base.screen),
896 dctx->pipe->dump_debug_state(dctx->pipe, f,
904 struct dd_context *dctx = (struct dd_context *)input;
905 struct dd_screen *dscreen = dd_screen(dctx->base.screen);
907 pipe_mutex_lock(dctx->mutex);
909 while (!dctx->kill_thread) {
910 struct dd_draw_record **record = &dctx->records;
919 if (*dctx->mapped_fence >= (*record)->sequence_no) {
934 *dctx->mapped_fence < (*record)->next->sequence_no)
937 dd_dump_record(dctx, *record, *dctx->mapped_fence, now);
945 pipe_mutex_unlock(dctx->mutex);
947 pipe_mutex_lock(dctx->mutex);
951 while (dctx->records)
952 dd_free_record(&dctx->records);
954 pipe_mutex_unlock(dctx->mutex);
959 dd_get_driver_shader_log(struct dd_context *dctx)
966 if (!dctx->max_log_buffer_size)
967 dctx->max_log_buffer_size = 16 * 1024;
975 buf = malloc(dctx->max_log_buffer_size);
978 f = fmemopen(buf, dctx->max_log_buffer_size, "a");
984 dd_dump_driver_state(dctx, f, PIPE_DUMP_CURRENT_SHADERS);
989 if (written_bytes < dctx->max_log_buffer_size - 1)
994 dctx->max_log_buffer_size *= 2;
1005 dd_pipelined_process_draw(struct dd_context *dctx, struct dd_call *call)
1007 struct pipe_context *pipe = dctx->pipe;
1017 log = dd_get_driver_shader_log(dctx);
1029 dctx->sequence_no++;
1030 pipe->clear_buffer(pipe, dctx->fence, 0, 4, &dctx->sequence_no, 4);
1034 record->sequence_no = dctx->sequence_no;
1041 dd_copy_draw_state(&record->draw_state.base, &dctx->draw_state);
1044 pipe_mutex_lock(dctx->mutex);
1045 record->next = dctx->records;
1046 dctx->records = record;
1047 pipe_mutex_unlock(dctx->mutex);
1054 struct dd_context *dctx = dd_context(_pipe);
1055 struct pipe_context *pipe = dctx->pipe;
1057 switch (dd_screen(dctx->base.screen)->mode) {
1059 dd_flush_and_handle_hang(dctx, fence, flags,
1073 dd_before_draw(struct dd_context *dctx)
1075 struct dd_screen *dscreen = dd_screen(dctx->base.screen);
1079 dctx->num_draw_calls >= dscreen->skip_count)
1080 dd_flush_and_handle_hang(dctx, NULL, 0,
1086 dd_after_draw(struct dd_context *dctx, struct dd_call *call)
1088 struct dd_screen *dscreen = dd_screen(dctx->base.screen);
1089 struct pipe_context *pipe = dctx->pipe;
1091 if (dctx->num_draw_calls >= dscreen->skip_count) {
1095 dd_flush_and_check_hang(dctx, NULL, 0)) {
1096 dd_write_report(dctx, call,
1108 dd_pipelined_process_draw(dctx, call);
1113 dd_write_report(dctx, call,
1121 dctx->draw_state.apitrace_call_number) {
1122 dd_write_report(dctx, call,
1135 ++dctx->num_draw_calls;
1136 if (dscreen->skip_count && dctx->num_draw_calls % 10000 == 0)
1138 dctx->num_draw_calls);
1145 struct dd_context *dctx = dd_context(_pipe);
1146 struct pipe_context *pipe = dctx->pipe;
1152 dd_before_draw(dctx);
1154 dd_after_draw(dctx, &call);
1161 struct dd_context *dctx = dd_context(_pipe);
1162 struct pipe_context *pipe = dctx->pipe;
1168 dd_before_draw(dctx);
1170 dd_after_draw(dctx, &call);
1180 struct dd_context *dctx = dd_context(_pipe);
1181 struct pipe_context *pipe = dctx->pipe;
1194 dd_before_draw(dctx);
1198 dd_after_draw(dctx, &call);
1204 struct dd_context *dctx = dd_context(_pipe);
1205 struct pipe_context *pipe = dctx->pipe;
1211 dd_before_draw(dctx);
1213 dd_after_draw(dctx, &call);
1225 struct dd_context *dctx = dd_context(_pipe);
1226 struct pipe_context *pipe = dctx->pipe;
1238 dd_before_draw(dctx);
1241 dd_after_draw(dctx, &call);
1249 struct dd_context *dctx = dd_context(_pipe);
1250 struct pipe_context *pipe = dctx->pipe;
1256 dd_before_draw(dctx);
1258 dd_after_draw(dctx, &call);
1266 struct dd_context *dctx = dd_context(_pipe);
1267 struct pipe_context *pipe = dctx->pipe;
1276 dd_before_draw(dctx);
1278 dd_after_draw(dctx, &call);
1289 struct dd_context *dctx = dd_context(_pipe);
1290 struct pipe_context *pipe = dctx->pipe;
1295 dd_before_draw(dctx);
1298 dd_after_draw(dctx, &call);
1308 struct dd_context *dctx = dd_context(_pipe);
1309 struct pipe_context *pipe = dctx->pipe;
1314 dd_before_draw(dctx);
1318 dd_after_draw(dctx, &call);
1326 struct dd_context *dctx = dd_context(_pipe);
1327 struct pipe_context *pipe = dctx->pipe;
1337 dd_before_draw(dctx);
1339 dd_after_draw(dctx, &call);
1343 dd_init_draw_functions(struct dd_context *dctx)