Skip to content

Crashes and bugs and unexpected results #29

Open
@danilw

Description

@danilw

I have this repo https://github.com/danilw/GPU-my-list-of-bugs
In this my "List of shader bugs" some shaders with UB and other "edge-cases".
I tested shaders from this my lit with this project spvm.

Using spvm_shadertoy of this project to test.

To test with llvmpipe I use https://github.com/danilw/vulkan-shadertoy-launcher GPU detected as
Vulkan GPU - CPU: llvmpipe (LLVM 14.0.4, 256 bits) (id: 0x0000) from vendor 0x10005 [driver version: 0x0001, API version: 0x4030D3]

(I list only "broken" results, correct not listed)
(multi-channel shaders not tested, just few where I copy Buf code as Image shader code)

Shadertoy link llvmpipe(CPU) result spvm result
https://www.shadertoy.com/view/wdVyWD freeze, can not render frame crash segfault, even removing texture function from code
https://www.shadertoy.com/view/7ddfzr 1 2
https://www.shadertoy.com/view/ftXXW4 works as expected crash segfault, even removing texture function from code
https://www.shadertoy.com/view/7lt3Rl 11 22
https://www.shadertoy.com/view/NsBBDW 111 222
https://www.shadertoy.com/view/ftlcDS works, screenshot in Shadertoy comments crash segfault
https://www.shadertoy.com/view/slsXzs white black (not bug, its UB)
https://www.shadertoy.com/view/NsXBWr works (use BufA as Image shader) crash segfault, even removing texture function from code (use BufA as Image shader)

More:

https://github.com/danilw/card-game-GLSL

Using original_bufA.glsl as Image shader (rename iChannel3 to iChannel0 for spvm_shadertoy). Expected result - background should be rendered. llvmpipe(CPU) result - render single frame after 1 min of "loading shader". spvm result - crash segfault.

Using unrolled_bufA.glsl as Image shader (same rename). llvmpipe result - render single frame after 1 min of "loading shader". spvm result - crash segfault.

My public shaders:

Shadertoy link llvmpipe(CPU) result spvm result
https://www.shadertoy.com/view/NslGRN works(after 1 min of shader loading) crash segfault
https://www.shadertoy.com/view/sldGDf works crash segfault
https://www.shadertoy.com/view/4lKcDD works crash segfault
https://www.shadertoy.com/view/NljfzV works as expected, 2-3 fps 1 frame per 3 min.... and visual result does not look correct , to test I set #define iTime 2.0 and #define iMouse vec4(0.) 333
https://www.shadertoy.com/view/lttfR8 works as expected incorrect visual result 4444
https://www.shadertoy.com/view/wt2fWw works as expected crash segfault
https://www.shadertoy.com/view/4sdBDn works as expected crash segfault
https://www.shadertoy.com/view/4dGBWy (shader had one not initialized variable, this why result in llvmpile was incorrect) works as expected after fix crash segfault (tested again, same crash)

Surprisingly, this shader https://www.shadertoy.com/view/Nt2Szm works in spvm when it complex enough.
And this same shader GLES2 port https://www.shadertoy.com/view/fdc3Dn works in spvm. (1 frame per min)
When this same shader unrolled version https://www.shadertoy.com/view/sdcGDr - does not work in spvm. spvm result - crash segfault. llvmpipe(CPU) result - works as expected.


I made this "test" just for fun, idk if it can be considered "useful".
Result is - most of my shaders dont work with spvm.
llvmpipe is still best option to launch your shaders on CPU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions