devkitPro / libctru

Homebrew development library for Nintendo 3DS/Horizon OS user mode (Arm11)
https://libctru.devkitpro.org/
770 stars 170 forks source link

shaderInstanceInit doesn't initialize numFloat24Uniforms if no constant table is present #535

Closed neobrain closed 10 months ago

neobrain commented 10 months ago

Trying to use shaderInstanceInit on a DVLE with no constant table will leave si->numFloat24Uniforms uninitialized (instead, only si->float24Uniforms gets set to null). This causes problems in citro3d's uniform managing code, which assumes si->numFloat24Uniforms to be zero if no constants are provided.

It seems reasonable to me that citro3d behaves like this. libctru should just set numFloat24Uniforms to 0 instead by default.