Mesa (master): i965: perf: use gen_device_info rather then brw_context
Lionel Landwerlin
llandwerlin at kemper.freedesktop.org
Mon Jun 19 21:15:09 UTC 2017
Module: Mesa
Branch: master
Commit: bf5ca4f0b2e145064194ec0470258439b8a2e44e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf5ca4f0b2e145064194ec0470258439b8a2e44e
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Sun Apr 23 19:12:00 2017 -0700
i965: perf: use gen_device_info rather then brw_context
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_performance_query.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index 66128869f4..06576a54d0 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -1374,6 +1374,7 @@ add_basic_stat_reg(struct brw_perf_query_info *query,
static void
init_pipeline_statistic_query_registers(struct brw_context *brw)
{
+ const struct gen_device_info *devinfo = &brw->screen->devinfo;
struct brw_perf_query_info *query = append_query_info(brw);
query->kind = PIPELINE_STATS;
@@ -1389,7 +1390,7 @@ init_pipeline_statistic_query_registers(struct brw_context *brw)
add_basic_stat_reg(query, VS_INVOCATION_COUNT,
"N vertex shader invocations");
- if (brw->gen == 6) {
+ if (devinfo->gen == 6) {
add_stat_reg(query, GEN6_SO_PRIM_STORAGE_NEEDED, 1, 1,
"SO_PRIM_STORAGE_NEEDED",
"N geometry shader stream-out primitives (total)");
@@ -1438,7 +1439,7 @@ init_pipeline_statistic_query_registers(struct brw_context *brw)
add_basic_stat_reg(query, CL_PRIMITIVES_COUNT,
"N primitives leaving clipping");
- if (brw->is_haswell || brw->gen == 8)
+ if (devinfo->is_haswell || devinfo->gen == 8)
add_stat_reg(query, PS_INVOCATION_COUNT, 1, 4,
"N fragment shader invocations",
"N fragment shader invocations");
@@ -1448,7 +1449,7 @@ init_pipeline_statistic_query_registers(struct brw_context *brw)
add_basic_stat_reg(query, PS_DEPTH_COUNT, "N z-pass fragments");
- if (brw->gen >= 7)
+ if (devinfo->gen >= 7)
add_basic_stat_reg(query, CS_INVOCATION_COUNT,
"N compute shader invocations");
More information about the mesa-commit
mailing list