Shader compilation problems on Vulkan

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Shader compilation problems on Vulkan

Postby Graf Zahl » Tue Jul 02, 2019 2:17 am

Reporting because right now I cannot address this myself:

A user shader using 'texture2D' to look up a texture fails to compile with Vulkan. Manually changing 'texture2D' to 'texture' makes it work.
Discovered with Freaky Panties.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Shader compilation problems on Vulkan

Postby _mental_ » Tue Jul 02, 2019 2:33 am

The problem exists with Apple’s OpenGL too. But with Vulkan it affects all platforms.
I would solve this by adding texture?D functions to our shader header. This solution was already used for noise functions.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Shader compilation problems on Vulkan

Postby Graf Zahl » Tue Jul 02, 2019 4:04 am

I don't think that's a good idea - on Windows 'texrture2D' is still a valid builtin function. So this has to be done platform specific or the text has to be replaced in-place before compilation.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Shader compilation problems on Vulkan

Postby _mental_ » Tue Jul 02, 2019 4:48 am

Our shader header is different for OpenGL and Vulkan.
I mentioned Apple’s OpenGL just for the sake of completeness. I have no plans to fix it.
With Vulkan renderer texture2D needs to be handled regardless of platform.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Shader compilation problems on Vulkan

Postby Graf Zahl » Tue Jul 02, 2019 5:05 am

It also needs to get fixed on OpenGL, because if Apple fails here, there's no guarantee that other implementors also remove deprecated functionality.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Bugs

Who is online

Users browsing this forum: Trendiction.de [Bot] and 1 guest