gamma-driver icon indicating copy to clipboard operation
gamma-driver copied to clipboard

Warn about rapidly switching between n programs

Open sgrove opened this issue 10 years ago • 1 comments

Likely GD needs to have configurable warnings for dev and prod, which is a separate issue, but this is a big one for performance.

If in drawing one frame we gl.useProgram X, gl.useProgram Y, and then at any later point in drawing that frame call gl.useProgram X again, GD should issue a (one time per program run?) warning that it's more efficient to batch all draw calls by program, and highlight that we've useProgram'd X (likely a case for a :name or :id key on programs for debugging) at least twice in one frame. Help newbs (like yours truly) avoid making obvious perf mistakes, especially ones that they may not be aware of.

sgrove avatar Jun 01 '15 16:06 sgrove

I'd prefer to have a separate "logging" driver, and then forms of analysis over that log, rather than put this kind of logic into the basic driver.

kovasb avatar Jun 01 '15 21:06 kovasb