Welcome, Guest.
Username: Password: Remember me

TOPIC: Shader freezes the game

Shader freezes the game 4 months 2 weeks ago #1

(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! [ Click to expand ]
Last Edit: 4 months 2 weeks ago by matsilagi.
The administrator has disabled public write access.

Shader freezes the game 4 months 2 weeks ago #2

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?
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
The administrator has disabled public write access.

Shader freezes the game 4 months 2 weeks ago #3

Tested it on Quake, Quake 3, Re-Volt GL and DOOM 2016.
All of them crashed.
The administrator has disabled public write access.

Shader freezes the game 4 months 2 weeks ago #4

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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
The administrator has disabled public write access.

Shader freezes the game 4 months 2 weeks ago #5

Just FYI: "[unroll]", "[loop]", etc. don't have any effect in OpenGL. They only affect DX apps.
Cheers, crosire =)
The administrator has disabled public write access.

Shader freezes the game 4 months 2 weeks ago #6

Oh, I assumed ReShade unrolled the loops, rip.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
The administrator has disabled public write access.

Shader freezes the game 4 months 1 week ago #7

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.
The administrator has disabled public write access.