rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Use a software renderer for kittest

Open abey79 opened this issue 1 year ago • 1 comments

Kittest-based UI snapshot test currently use whatever hardware backend wgpu picks, which has multiple drawbacks:

  • each backend may produce a slightly different output, making comparison more difficult
  • a hardware backed is required, which rules out windows and linux GHA runners

Using a software rendering backend would solve both of these issues.

abey79 avatar Nov 28 '24 16:11 abey79

each backend may produce a slightly different output, making comparison more difficult

According to @Wumpf this is likely due to differences in filtering. If we use a manual four-tap bilinear filter in the egui pixel shader we should get a lot closer results, hopefully within the error margins.

emilk avatar Nov 29 '24 10:11 emilk

Using a software rendering backend would solve both of these issues.

Unfortunately not true since software renderer among each other also have different results. E.g. llvmpipe won't give use the same as microsoft's WARP

Wumpf avatar Jan 07 '25 17:01 Wumpf

So we're back to the manual-texture-filtering idea then?

emilk avatar Jan 07 '25 19:01 emilk

That would surely alleviate the issue(s) significantly (very much in favor of trying that for the egui shader!), but we'll for sure never catch all differences anyways 🤷 - we can't realistically catch all sources of rendering discrepancies everywhere. I don't think there's a remedy for tweaking error thresholds

Wumpf avatar Jan 07 '25 22:01 Wumpf