nvc0: reduce the number of GPR used when reading MP perf counters
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 14 Nov 2015 16:20:09 +0000 (17:20 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 14 Nov 2015 16:38:57 +0000 (17:38 +0100)
No need to allocate more GPR than used in the compute kernel which
reads MP performance counters on Fermi.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c

index 44b222e5134b0af0326b00a6296ba596694ae8ec..7962143d45ab9f071abc7f803420b98283ef9f92 100644 (file)
@@ -1014,14 +1014,15 @@ nvc0_hw_sm_end_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq)
       struct nvc0_program *prog = CALLOC_STRUCT(nvc0_program);
       prog->type = PIPE_SHADER_COMPUTE;
       prog->translated = true;
-      prog->num_gprs = 14;
       prog->parm_size = 12;
       if (is_nve4) {
          prog->code = (uint32_t *)nve4_read_hw_sm_counters_code;
          prog->code_size = sizeof(nve4_read_hw_sm_counters_code);
+         prog->num_gprs = 14;
       } else {
          prog->code = (uint32_t *)nvc0_read_hw_sm_counters_code;
          prog->code_size = sizeof(nvc0_read_hw_sm_counters_code);
+         prog->num_gprs = 12;
       }
       screen->pm.prog = prog;
    }