$ shader_runner shaders/closed/UnrealEngine4/PlatformerGame/232.shader_test -auto shader_runner: brw_fs_combine_constants.cpp:302: bool fs_visitor::opt_combine_constants(): Assertion `fabsf(reg->f) == table.imm[i].val' failed. It looks like the value is some kind of NaN: (gdb) p reg->f $1 = -nan(0x400000) (gdb) p table.imm[i].val $2 = nan(0x400000)
I don't know what to say. The shader contains vec3((0.0/0.0),(0.0/0.0),(0.0/0.0)) We can change the assert to assert(isnan(reg->f) || fabsf(reg->f) == table.imm[i].val); but I can't believe this is what they intended to do -- it's used directly in the expression that calculates the color output.
Yeah, I can't imagine that's what they want to do either. That change sounds good, though.
Fixed by: i965/fs: Skip assertion on NaN. A shader in Unreal4 uses the result of divide by zero in its color output, producing NaN and triggering this assertion since NaN is not equal to itself.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.