bgfx icon indicating copy to clipboard operation
bgfx copied to clipboard

Don't encode invalid programs as valid unrelated programs

Open skyostil opened this issue 4 years ago • 2 comments

When an invalid program is submitted with bgfx::touch(), it gets encoded as program index 0 by the command encoder. Since program 0 can be a valid program (typically it's the debug text blitter program), this can result in garbage being drawn by the renderer.

This patch changes invalid programs to be encoded as invalid programs, so the renderer can properly ignore them.

skyostil avatar Aug 14 '20 17:08 skyostil

Not sure if this is the right fix, but I noticed the GL renderer turning bgfx::touch() into actual rendering calls using geometry from another draw call.

skyostil avatar Aug 14 '20 17:08 skyostil

I noticed that even with my earlier fix the decoder doesn't recognize invalid programs correctly, so I made a follow-up. Does this seem right, or am I missing something about how bgfx::touch() works?

skyostil avatar Sep 30 '20 22:09 skyostil