示例#1
0
        /// <summary>
        /// Clears one bound color target.
        /// </summary>
        /// <param name="state">GPU state at the time of the call</param>
        /// <param name="arg0">First argument of the call</param>
        private void ClearColor(IDeviceState state, int arg0)
        {
            int index      = (arg0 >> 6) & 0xf;
            int layerCount = state.Read(ColorLayerCountOffset + index * ColorStructSize);

            _processor.ThreedClass.Clear(arg0, layerCount);
        }
示例#2
0
        /// <summary>
        /// Reads data from a GPU register at the given offset.
        /// </summary>
        /// <param name="offset">Offset to be read</param>
        /// <returns>Data at the register</returns>
        public int Read(int offset)
        {
            if (_deviceState != null)
            {
                return(_deviceState.Read(offset * 4));
            }

            return(_memory[offset]);
        }
示例#3
0
        /// <summary>
        /// Clears the current depth-stencil target.
        /// </summary>
        /// <param name="state">GPU state at the time of the call</param>
        /// <param name="arg0">First argument of the call</param>
        private void ClearDepthStencil(IDeviceState state, int arg0)
        {
            int layerCount = state.Read(ZetaLayerCountOffset);

            _processor.ThreedClass.Clear(arg0, layerCount);
        }
示例#4
0
 /// <summary>
 /// Reads data from a GPU register.
 /// </summary>
 /// <param name="state">Current GPU state</param>
 /// <param name="reg">Register offset to read</param>
 /// <returns>GPU register value</returns>
 private int Read(IDeviceState state, int reg)
 {
     return(state.Read(reg * 4));
 }
示例#5
0
 /// <summary>
 /// Reads data from a GPU register.
 /// </summary>
 /// <param name="state">Current GPU state</param>
 /// <param name="reg">Register offset to read</param>
 /// <returns>GPU register value</returns>
 public static int Read(IDeviceState state, int reg)
 {
     return(state.Read(reg * 4));
 }