Пример #1
0
 /// <summary>
 /// Creates a new instance of a GPU channel.
 /// </summary>
 /// <param name="context">GPU context that the channel belongs to</param>
 internal GpuChannel(GpuContext context)
 {
     _context       = context;
     _device        = context.GPFifo;
     _processor     = new GPFifoProcessor(context, this);
     BufferManager  = new BufferManager(context, this);
     TextureManager = new TextureManager(context, this);
 }
Пример #2
0
        /// <summary>
        /// Creates a new instance of the GPU emulation context.
        /// </summary>
        /// <param name="renderer">Host renderer</param>
        public GpuContext(IRenderer renderer)
        {
            Renderer = renderer;

            MemoryManager = new MemoryManager(this);

            Methods = new Methods(this);

            GPFifo = new GPFifoDevice(this);

            Synchronization = new SynchronizationManager();

            Window = new Window(this);

            _caps = new Lazy <Capabilities>(Renderer.GetCapabilities);
        }
Пример #3
0
        /// <summary>
        /// Creates a new instance of the GPU emulation context.
        /// </summary>
        /// <param name="renderer">Host renderer</param>
        public GpuContext(IRenderer renderer)
        {
            Renderer = renderer;

            GPFifo = new GPFifoDevice(this);

            Synchronization = new SynchronizationManager();

            Window = new Window(this);

            HostInitalized = new ManualResetEvent(false);

            SyncActions      = new List <Action>();
            SyncpointActions = new List <Action>();

            DeferredActions = new Queue <Action>();

            PhysicalMemoryRegistry = new ConcurrentDictionary <long, PhysicalMemory>();
        }
Пример #4
0
        /// <summary>
        /// Creates a new instance of the GPU emulation context.
        /// </summary>
        /// <param name="renderer">Host renderer</param>
        public GpuContext(IRenderer renderer)
        {
            Renderer = renderer;

            MemoryManager = new MemoryManager(this);

            Methods = new Methods(this);

            GPFifo = new GPFifoDevice(this);

            Synchronization = new SynchronizationManager();

            Window = new Window(this);

            _caps = new Lazy <Capabilities>(Renderer.GetCapabilities);

            HostInitalized = new ManualResetEvent(false);
            ReadyEvent     = new ManualResetEvent(false);
        }