Exemplo n.º 1
0
        /// <summary>
        /// Writes a GPU counter to guest memory.
        /// </summary>
        /// <param name="state">Current GPU state</param>
        /// <param name="argument">Method call argument</param>
        private void Report(GpuState state, int argument)
        {
            SemaphoreOperation op   = (SemaphoreOperation)(argument & 3);
            ReportCounterType  type = (ReportCounterType)((argument >> 23) & 0x1f);

            switch (op)
            {
            case SemaphoreOperation.Release: ReleaseSemaphore(state);    break;

            case SemaphoreOperation.Counter: ReportCounter(state, type); break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Writes a GPU counter to guest memory.
        /// </summary>
        /// <param name="argument">Method call argument</param>
        public void Report(int argument)
        {
            SemaphoreOperation op   = (SemaphoreOperation)(argument & 3);
            ReportCounterType  type = (ReportCounterType)((argument >> 23) & 0x1f);

            switch (op)
            {
            case SemaphoreOperation.Release: ReleaseSemaphore(); break;

            case SemaphoreOperation.Counter: ReportCounter(type); break;
            }
        }