diff options
-rw-r--r-- | src/gallium/drivers/iris/iris_monitor.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_monitor.c b/src/gallium/drivers/iris/iris_monitor.c index c4194052def..a8409607c7a 100644 --- a/src/gallium/drivers/iris/iris_monitor.c +++ b/src/gallium/drivers/iris/iris_monitor.c @@ -72,16 +72,17 @@ iris_get_monitor_info(struct pipe_screen *pscreen, unsigned index, case GEN_PERF_COUNTER_DATA_TYPE_BOOL32: case GEN_PERF_COUNTER_DATA_TYPE_UINT32: info->type = PIPE_DRIVER_QUERY_TYPE_UINT; - info->max_value.u32 = 0; + assert(counter->raw_max <= UINT32_MAX); + info->max_value.u32 = (uint32_t)counter->raw_max; break; case GEN_PERF_COUNTER_DATA_TYPE_UINT64: info->type = PIPE_DRIVER_QUERY_TYPE_UINT64; - info->max_value.u64 = 0; + info->max_value.u64 = counter->raw_max; break; case GEN_PERF_COUNTER_DATA_TYPE_FLOAT: case GEN_PERF_COUNTER_DATA_TYPE_DOUBLE: info->type = PIPE_DRIVER_QUERY_TYPE_FLOAT; - info->max_value.u64 = -1; + info->max_value.f = counter->raw_max; break; default: assert(false); |