DadSchoorse / vkBasalt

a vulkan post processing layer for linux
zlib License
1.24k stars 52 forks source link

mem error bug #240

Open remi75 opened 2 weeks ago

remi75 commented 2 weeks ago

Hello

I have vkbasalt working on a Linux machine really good, but with one shader I have bad:mem error: "std::bad_alloc" and instant crash/halt of the program, like glxgears or vkcube etc

the problematic shader is: https://github.com/BlueSkyDefender/Depth3D/tree/master/Shaders .

ps: I have contacted the dev of the shader, in case the issue could be on "his" side ... regards

remi75 commented 2 weeks ago

hello, I am pasting here the exact log:

user@unit03:~$ ENABLE_VKBASALT=1 vkgears [ENTER] vkBasalt info: config file: /etc/vkBasalt.conf vkBasalt info: toggleKey = Pause vkBasalt info: effects = SBS vkBasalt info: SBS = /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx vkBasalt info: reshadeIncludePath = /home/user/Téléchargements/Depth3D-master/Shaders vkBasalt info: reshadeTexturePath = /home/user/Téléchargements/Depth3D-master/Textures/ vkBasalt err: /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx(5147, 1): warning X4576: 'InfoOut': input parameter 'texcoord' semantic does not match vertex shader one vkBasalt err: /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx(5173, 1): warning X4576: 'Average_Info': input parameter 'texcoord' semantic does not match vertex shader one vkBasalt err: /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx(5183, 1): warning X4576: 'zBuffer_Blur': input parameter 'texcoord' semantic does not match vertex shader one vkBasalt err: /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx(5189, 1): warning X4576: 'DepthMap': input parameter 'texcoord' semantic does not match vertex shader one vkBasalt err: /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx(5196, 1): warning X4576: 'Mod_Z': input parameter 'texcoord' semantic does not match vertex shader one vkBasalt err: /home/user/Téléchargements/Depth3D-master/Shaders/SuperDepth3D.fx(5203, 1): warning X4576: 'Mix_Z': input parameter 'texcoord' semantic does not match vertex shader one

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

Abandon (core dumped)

134 user@unit03:~$

regards

birdspider commented 1 day ago

@remi75

hi, I hunted a similar issue and this was my workaround, the (TSMAA2.fx) shader specs I used had a uniform with anotation but without actual value;

that is also the case in the shader you mentioned:

uniform int SuperDepth3D <
   # ... long list of stuff, for reshade-ui I think
> ;

from the shaders point of view this is:

uniform int SuperDepth3D ;

it seems vkBasalt has trouble parsing that format, so what I did was to set a default value (and delete the "annotation"), like so: (but be sure to check what value makes sense)

uniform int SuperDepth3D = 0;
remi75 commented 15 hours ago

I have tried a few values, no luck yet.