I made a game and engine in D that's a cross between Superliminal and Viewfinder, and you can play the demo now
Hipreme
msnmancini at hotmail.com
Wed Apr 2 12:40:05 UTC 2025
On Wednesday, 2 April 2025 at 09:37:44 UTC, Lewis wrote:
> On Friday, 28 March 2025 at 22:44:56 UTC, Hipreme wrote:
>> On Thursday, 27 March 2025 at 06:27:19 UTC, Lewis wrote:
>>> On Thursday, 6 March 2025 at 15:35:19 UTC, Element Green
>>> wrote:
>>>> [...]
>>>
>>> For anyone coming to this later, the Proton flickering bug
>>> should be fixed now :)
>>
>> That's interesting! How did you fix it?
>
> It turned out to be debug code in a shader that was
> accidentally getting compiled in. The debug code checked a
> constant buffer value indicating whether the level editor was
> active, and if so it disabled the paint-in effect (and just
> made everything fully painted in).
>
> In release, we don't bother ever setting this
> isLevelEditorActive parameter, since the editor is compiled out
> of the release build and thus unusable. But this bad debug code
> was still using the parameter. And since nobody was setting the
> value, the value was unspecified. On most GPUs/drivers, it
> seemed to be defaulting to 0, aka no editor, so it worked out
> by accident. But when using Proton, for whatever reason, it
> didn't default to 0 and instead had random unspecified values,
> so it flickered between on and off.
>
> A classic case of a bug that was occurring on all machines, but
> only actually showing observable symptoms on a select few. The
> good news is that I installed a Ubuntu dual boot in order to
> track this down, so I can now just test on Proton as a matter
> of course when pushing out updates.
Oh that makes a lot of sense! There exists a lot of issues in
regard of unused shader variables, so, it is a must check every
time. On OpenGL, for example, if a variable is unused, it might
get removed from the shader and trying to set it somewhere will
cause issues. Uninitialized is almost on the same ground of
undefined behavior
More information about the Digitalmars-d-announce
mailing list