From: Samuel <samuel.pitoi...@gmail.com>

---
 src/gallium/drivers/nvc0/nvc0_query.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_query.c 
b/src/gallium/drivers/nvc0/nvc0_query.c
index 75c515a..7fc1ca9 100644
--- a/src/gallium/drivers/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nvc0/nvc0_query.c
@@ -1141,8 +1141,12 @@ nvc0_screen_get_driver_query_info(struct pipe_screen 
*pscreen,
    count += NVC0_QUERY_DRV_STAT_COUNT;
 
    if (screen->base.class_3d >= NVE4_3D_CLASS) {
-      if (screen->base.device->drm_version >= 0x01000101)
+      if (screen->base.device->drm_version >= 0x01000101) {
          count += NVE4_PM_QUERY_COUNT;
+      } else {
+         NOUVEAU_ERR("DRM version is too old to use performance counters!\n");
+         return count;
+      }
    }
    if (!info)
       return count;
-- 
1.8.3.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to