Beispiel #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();
        }
Beispiel #2
0
        /// <summary>
        /// Initialize the GPU shader cache.
        /// </summary>
        public void InitializeShaderCache()
        {
            HostInitalized.WaitOne();

            foreach (var physicalMemory in PhysicalMemoryRegistry.Values)
            {
                physicalMemory.ShaderCache.Initialize();
            }
        }
Beispiel #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();
 }
Beispiel #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();
        }
Beispiel #5
0
        /// <summary>
        /// Initialize the GPU shader cache.
        /// </summary>
        public void InitializeShaderCache()
        {
            HostInitalized.WaitOne();

            Methods.ShaderCache.Initialize();
        }