If you are getting DirectX Function Error DXGI_ERROR_DEVICE_REMOVED or DXGI_ERROR_DEVICE_HUNG while playing Dragon Age The Veilguard you might as well take it as a sign to stop playing the game! (It's terrible) But! If you really want to put yourself through that horrendous experience we'll make sure that you can by showing you how to fix this super annoying and quite common DirectX error message. Thankfully it's just a shader caching issue so won't take too long to fix.

Takeaways:

  1. Learn how to fix Dragon Age The Veilguard DirectX Function Error (DXGI ERROR DEVICE REMOVED/DXGI ERROR DEVICE HUNG)
  2. What is causing DirectX Function Error (DXGI ERROR DEVICE REMOVED/DXGI ERROR DEVICE HUNG) in Dragon Age The Veilguard?

How to Fix Dragon Age The Veilguard DirectX Function Error (DXGI ERROR DEVICE REMOVED/DXGI ERROR DEVICE HUNG)

99% of the time this error message is a simple shader caching issue. Essentially some kind of minor corruption, so you'll need to clear your cache to solve the problem. Once you have cleared the cache it will redownload and process and start working. The easiest way to find the file to delete is to do the following.

  • Open Steam find DA: Veilguard then right-click and select Properties.
  • Now change to the Install Files tab and click Browse.
  • This will open File Explorer in the location you need.
  • Now use the search option in Dile Explorer to search Shaders then delete the Shader_Cache and/or shaders.psarc file. (You might not see both)
  • After you have done this, you can launch the game again and it will re-download and compile the shaders again.

Now Increase your Shader Cache Size (NVIDIA Control Panel)

  • Next, open the NVIDIA Control Panel to increase the shader cache size.
  • When you have NVIDIA Control open go to Manage 3D Settings.
  • Here you have two options you can increase the shader cache globally (for every bit of software that uses shaders) or Program Settings. I generally prefer to adjust it globally (less messing around).
  • Now scroll down and find Shader Cache Size and set it to 10 or 100GB. 100GB is best if you have the space.
  • Then click Apply to save the changes and restart your computer for the change to take effect.

How to Fix Dragon Age The Veilguard DirectX Function Error (DXGI ERROR DEVICE REMOVED/DXGI ERROR DEVICE HUNG)

Why Is Increasing the Shader Cache Size Important?

Increasing the shader cache size helps your GPU manage a larger number of compiled shaders without constantly purging older data. This is particularly useful for modern, graphically demanding games that use extensive shader operations to create detailed environments and effects. When the shader cache is too small, your system might constantly delete and recompile shaders, leading to delays or errors. By setting the cache size to 10GB or even 100GB, you ensure that the GPU can store enough compiled shaders to maintain consistent performance and stability.

Understanding Shaders

To fully grasp why clearing and increasing shader cache size can prevent these DirectX errors, it’s helpful to understand what shaders are and why they matter.

Shaders are small programs that run on the GPU and are responsible for rendering graphics and effects in games and 3D applications. They handle everything from calculating light and shadow to rendering complex textures and particle effects. There are several types of shaders, with the most common being

Vertex Shaders: Modify vertex data to control how 3D objects are transformed and positioned on the screen.

  • Pixel (or Fragment) Shaders: Calculate colour, texture, and effects for each pixel, which is essential for realistic imagery.
  • Geometry Shaders: Add, remove, or modify vertices to create more complex shapes within the pipeline.

When you play a game, the GPU compiles these shader programs in real time and stores them in a cache for quick access. This allows the game to run smoothly by reusing compiled shaders instead of compiling them from scratch each time a frame is rendered. However, if this cache becomes too small, corrupted, or mismanaged, errors like DXGI_ERROR_DEVICE_HUNG can occur due to failed or incomplete shader operations.