summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-02-06 17:29:32 +0000
committerLionel Landwerlin <[email protected]>2018-03-08 23:05:00 +0000
commit80cd669a320fa0666d50f8427980401136f8f667 (patch)
treeb1e644ea2b6860248fe98bb98f7bfe0a1a95d4e5 /src/mesa
parent9b7db1281521b95acb04db624bf93193fd3d4f56 (diff)
i965: perf: default case for unknown query types
Just some extra safety before further changes. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index 613e61653fe..8cb9d8277aa 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -341,6 +341,9 @@ dump_perf_query_callback(GLuint id, void *query_void, void *brw_void)
o->Active ? "Active," : (o->Ready ? "Ready," : "Pending,"),
obj->pipeline_stats.bo ? "yes" : "no");
break;
+ default:
+ unreachable("Unknown query type");
+ break;
}
}
@@ -437,6 +440,10 @@ brw_get_perf_query_info(struct gl_context *ctx,
case PIPELINE_STATS:
*n_active = brw->perfquery.n_active_pipeline_stats_queries;
break;
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
}
@@ -1265,6 +1272,10 @@ brw_begin_perf_query(struct gl_context *ctx,
++brw->perfquery.n_active_pipeline_stats_queries;
break;
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
if (INTEL_DEBUG & DEBUG_PERFMON)
@@ -1321,6 +1332,10 @@ brw_end_perf_query(struct gl_context *ctx,
STATS_BO_END_OFFSET_BYTES);
--brw->perfquery.n_active_pipeline_stats_queries;
break;
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
}
@@ -1341,6 +1356,10 @@ brw_wait_perf_query(struct gl_context *ctx, struct gl_perf_query_object *o)
case PIPELINE_STATS:
bo = obj->pipeline_stats.bo;
break;
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
if (bo == NULL)
@@ -1386,9 +1405,12 @@ brw_is_perf_query_ready(struct gl_context *ctx,
return (obj->pipeline_stats.bo &&
!brw_batch_references(&brw->batch, obj->pipeline_stats.bo) &&
!brw_bo_busy(obj->pipeline_stats.bo));
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
- unreachable("missing ready check for unknown query kind");
return false;
}
@@ -1502,6 +1524,10 @@ brw_get_perf_query_data(struct gl_context *ctx,
case PIPELINE_STATS:
written = get_pipeline_stats_data(brw, obj, data_size, (uint8_t *)data);
break;
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
if (bytes_written)
@@ -1567,6 +1593,10 @@ brw_delete_perf_query(struct gl_context *ctx,
obj->pipeline_stats.bo = NULL;
}
break;
+
+ default:
+ unreachable("Unknown query type");
+ break;
}
free(obj);