2017-03-31 11:21 GMT+08:00 Ilia Mirkin <imir...@alum.mit.edu>: > Did you check what the blob does? There's clocklo/hi and > globaltimerlo/hi. Without additional documentation, it's a bit hard to > tell the difference... Note that envydis's gf100.c/gk110.c disagree on > which is which. Probably not due to any architectural reasons, but due > to RE methodology. (From before nvdisasm was > available/trusted/used/whatever.)
(replying to your concern in 1 and 2 at the same time) I have checked against the blob and nvidisasm before, and gk110.c in envydis was actually wrong. I made a PR for that [1]. This is what I get when using clockARB() on GK208: 281c0006 86400000 mov b32 $r1 $sr80 289c0002 86400000 mov b32 $r0 $sr81 (note $r1 <- $sr80, $r0 <- $sr81, and they are called SR_CLOCKLO and SR_CLOCKHI in nvdisasm respectively) I haven't really checked with maxwell+, just believing in the correctness in envydis and uniformity between architectures. But I will check when I reach my pascal machine later. Cheers. Boyan Ding [1] https://github.com/envytools/envytools/pull/84 > > On Thu, Mar 30, 2017 at 10:33 PM, Boyan Ding <boyan.j.d...@gmail.com> wrote: >> Signed-off-by: Boyan Ding <boyan.j.d...@gmail.com> >> --- >> src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp >> b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp >> index 6de3f396e3..ab9c94b4d0 100644 >> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp >> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp >> @@ -269,6 +269,7 @@ CodeEmitterGM107::emitSYS(int pos, const Value *val) >> case SV_INVOCATION_INFO: id = 0x1d; break; >> case SV_TID : id = 0x21 + val->reg.data.sv.index; break; >> case SV_CTAID : id = 0x25 + val->reg.data.sv.index; break; >> + case SV_CLOCK : id = 0x50 + val->reg.data.sv.index; break; >> default: >> assert(!"invalid system value"); >> id = 0; >> -- >> 2.12.0 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev