示例#1
0
        /// <summary>
        /// Performs a GPU method call.
        /// </summary>
        /// <param name="state">Current GPU state</param>
        /// <param name="value">Call argument</param>
        private void Send(GpuState state, int value)
        {
            MethodParams meth = new MethodParams(_methAddr, value);

            state.CallMethod(meth);

            _methAddr += _methIncr;
        }
示例#2
0
        /// <summary>
        /// Performs a GPU method call.
        /// </summary>
        /// <param name="state">Current GPU state</param>
        /// <param name="shadowState">Shadow GPU state</param>
        /// <param name="value">Call argument</param>
        private void Send(GpuState state, GpuState shadowState, int value)
        {
            // TODO: Figure out what TrackWithFilter does, compared to Track.
            if (_shadowCtrl == ShadowRamControl.Track ||
                _shadowCtrl == ShadowRamControl.TrackWithFilter)
            {
                shadowState.Write(_methAddr, value);
            }
            else if (_shadowCtrl == ShadowRamControl.Replay)
            {
                value = shadowState.Read(_methAddr);
            }

            MethodParams meth = new MethodParams(_methAddr, value);

            state.CallMethod(meth);

            _methAddr += _methIncr;
        }
示例#3
0
        /// <summary>
        /// Performs a GPU method call.
        /// </summary>
        /// <param name="value">Call argument</param>
        /// <param name="state">Current GPU state</param>
        /// <param name="methAddr">Address, in words, of the method</param>
        public static void Send(int value, GpuState state, int methAddr)
        {
            MethodParams meth = new MethodParams(methAddr, value);

            state.CallMethod(meth);
        }
示例#4
0
        /// <summary>
        /// Performs a GPU method call.
        /// </summary>
        /// <param name="state">Current GPU state</param>
        /// <param name="methAddr">Address, in words, of the method</param>
        /// <param name="value">Call argument</param>
        private static void Send(GpuState state, int methAddr, int value)
        {
            MethodParams meth = new MethodParams(methAddr, value);

            state.CallMethod(meth);
        }