예제 #1
0
        /// <summary>
        /// Initialize the GPU emulation context.
        /// </summary>
        /// <param name="logLevel">The log level required.</param>
        public void Initialize(GraphicsDebugLevel logLevel)
        {
            HostInitalized.WaitOne();

            Renderer.Initialize(logLevel);
            Methods.ShaderCache.Initialize();
            ReadyEvent.Set();
        }
예제 #2
0
        /// <summary>
        /// Initialize the GPU shader cache.
        /// </summary>
        public void InitializeShaderCache()
        {
            HostInitalized.WaitOne();

            foreach (var physicalMemory in PhysicalMemoryRegistry.Values)
            {
                physicalMemory.ShaderCache.Initialize();
            }
        }
예제 #3
0
 /// <summary>
 /// Disposes all GPU resources currently cached.
 /// It's an error to push any GPU commands after disposal.
 /// Additionally, the GPU commands FIFO must be empty for disposal,
 /// and processing of all commands must have finished.
 /// </summary>
 public void Dispose()
 {
     Methods.ShaderCache.Dispose();
     Methods.BufferManager.Dispose();
     Methods.TextureManager.Dispose();
     Renderer.Dispose();
     GPFifo.Dispose();
     HostInitalized.Dispose();
 }
예제 #4
0
        /// <summary>
        /// Disposes all GPU resources currently cached.
        /// It's an error to push any GPU commands after disposal.
        /// Additionally, the GPU commands FIFO must be empty for disposal,
        /// and processing of all commands must have finished.
        /// </summary>
        public void Dispose()
        {
            Renderer.Dispose();
            GPFifo.Dispose();
            HostInitalized.Dispose();

            // Has to be disposed before processing deferred actions, as it will produce some.
            foreach (var physicalMemory in PhysicalMemoryRegistry.Values)
            {
                physicalMemory.Dispose();
            }

            PhysicalMemoryRegistry.Clear();

            RunDeferredActions();
        }
예제 #5
0
        /// <summary>
        /// Initialize the GPU shader cache.
        /// </summary>
        public void InitializeShaderCache()
        {
            HostInitalized.WaitOne();

            Methods.ShaderCache.Initialize();
        }