Module: Mesa
Branch: master
Commit: 8022c7480e3f4a5e42d13d5671768aa9033dd07c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8022c7480e3f4a5e42d13d5671768aa9033dd07c

Author: Samuel Pitoiset <[email protected]>
Date:   Wed Dec 16 21:18:03 2015 +0100

nvc0: fix metric-achieved_occupancy calculation on Kepler

The maximum number of resident warps per multiprocessor is 64 on
Kepler instead of 48 on Fermi.

Signed-off-by: Samuel Pitoiset <[email protected]>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c
index 12fb609..323bd47 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c
@@ -420,7 +420,10 @@ sm30_hw_metric_calc_result(struct nvc0_hw_query *hq, 
uint64_t res64[8])
 {
    switch (hq->base.type - NVE4_HW_METRIC_QUERY(0)) {
    case NVE4_HW_METRIC_QUERY_ACHIEVED_OCCUPANCY:
-      return sm20_hw_metric_calc_result(hq, res64);
+      /* (active_warps / active_cycles) / max. number of warps on a MP */
+      if (res64[1])
+         return (res64[0] / (double)res64[1]) / 64;
+      break;
    case NVE4_HW_METRIC_QUERY_BRANCH_EFFICIENCY:
       return sm20_hw_metric_calc_result(hq, res64);
    case NVE4_HW_METRIC_QUERY_INST_ISSUED:

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to