Shader freezes the game

  • matsilagi
  • Topic Author
More
6 years 1 month ago - 6 years 1 month ago #1 by matsilagi Shader freezes the game was created by matsilagi
(I Can't post code so, you guys will have to work in the dark)

I have a shader (ADepthofField one) here, that it always crashes when enabling on OpenGL only.

It works fine in DX, compiles fine in OpenGL, but every time i enable it on a OpenGL game, it either softlocks the game or crashes. Any hints on what could cause this?

Again, without showing the code, since im not allowed to post it here.

Warning: Spoiler!
Last edit: 6 years 1 month ago by matsilagi.

Please Log in or Create an account to join the conversation.

  • luluco250
More
6 years 1 month ago #2 by luluco250 Replied by luluco250 on topic Shader freezes the game
Check if there's a loop going haywire. I've noticed loops sometimes crash OpenGL, try replacing [unroll] with [loop] if it uses those. It'll make the shader slow down significantly but you can check if it still freezes that way. Also have you tested it in another OpenGL game?

Please Log in or Create an account to join the conversation.

  • matsilagi
  • Topic Author
More
6 years 1 month ago #3 by matsilagi Replied by matsilagi on topic Shader freezes the game
Tested it on Quake, Quake 3, Re-Volt GL and DOOM 2016.
All of them crashed.

Please Log in or Create an account to join the conversation.

  • luluco250
More
6 years 1 month ago #4 by luluco250 Replied by luluco250 on topic Shader freezes the game
Well, try commenting out sections of the code until it doesn't crash, then reduce such sections until you can work out what line(s) is(are) causing the crash.

Please Log in or Create an account to join the conversation.

  • crosire
More
6 years 1 month ago #5 by crosire Replied by crosire on topic Shader freezes the game
Just FYI: "[unroll]", "[loop]", etc. don't have any effect in OpenGL. They only affect DX apps.

Please Log in or Create an account to join the conversation.

  • luluco250
More
6 years 1 month ago #6 by luluco250 Replied by luluco250 on topic Shader freezes the game
Oh, I assumed ReShade unrolled the loops, rip.

Please Log in or Create an account to join the conversation.

  • matsilagi
  • Topic Author
More
6 years 1 month ago #7 by matsilagi Replied by matsilagi on topic Shader freezes the game
Forgot to add to this thread.

Issue is solved, but only for the moment. It appears to be a bug on the nVidia driver, where loops are unrolled infinitely, switching whatever value that is used on a loop to a static one shall work fine.

The issue has already been sent to NV and is pending reply... Bug is unconfirmed on AMD cards.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.