private void QueryControl(NvGpuVmm vmm, GpuMethodCall methCall) { WriteRegister(methCall); long position = MakeInt64From2xInt32(NvGpuEngine3dReg.QueryAddress); int seq = Registers[(int)NvGpuEngine3dReg.QuerySequence]; int ctrl = Registers[(int)NvGpuEngine3dReg.QueryControl]; QueryMode mode = (QueryMode)(ctrl & 3); switch (mode) { case QueryMode.WriteSeq: vmm.WriteInt32(position, seq); break; case QueryMode.WriteCounterAndTimestamp: { // TODO: Implement counters. long counter = 1; long timestamp = PerformanceCounter.ElapsedMilliseconds; vmm.WriteInt64(position + 0, counter); vmm.WriteInt64(position + 8, timestamp); break; } } }
private void QueryControl(NvGpuVmm Vmm, NvGpuPBEntry PBEntry) { WriteRegister(PBEntry); long Position = MakeInt64From2xInt32(NvGpuEngine3dReg.QueryAddress); int Seq = Registers[(int)NvGpuEngine3dReg.QuerySequence]; int Ctrl = Registers[(int)NvGpuEngine3dReg.QueryControl]; QueryMode Mode = (QueryMode)(Ctrl & 3); switch (Mode) { case QueryMode.WriteSeq: Vmm.WriteInt32(Position, Seq); break; case QueryMode.WriteCounterAndTimestamp: { //TODO: Implement counters. long Counter = 1; long Timestamp = (uint)Environment.TickCount; Timestamp = (long)(Timestamp * 615384.615385); Vmm.WriteInt64(Position + 0, Counter); Vmm.WriteInt64(Position + 8, Timestamp); break; } } }
private void QueryControl(NvGpuVmm Vmm, GpuMethodCall MethCall) { WriteRegister(MethCall); long Position = MakeInt64From2xInt32(NvGpuEngine3dReg.QueryAddress); int Seq = Registers[(int)NvGpuEngine3dReg.QuerySequence]; int Ctrl = Registers[(int)NvGpuEngine3dReg.QueryControl]; QueryMode Mode = (QueryMode)(Ctrl & 3); switch (Mode) { case QueryMode.WriteSeq: Vmm.WriteInt32(Position, Seq); break; case QueryMode.WriteCounterAndTimestamp: { //TODO: Implement counters. long Counter = 1; long Timestamp = PerformanceCounter.ElapsedMilliseconds; Timestamp = (long)(Timestamp * 615384.615385); Vmm.WriteInt64(Position + 0, Counter); Vmm.WriteInt64(Position + 8, Timestamp); break; } } }