/// <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); }
/// <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]); }
/// <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); }
/// <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)); }
/// <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)); }