szeged / webrender

A GPU-based renderer for the web
https://doc.servo.org/webrender/
Mozilla Public License 2.0
45 stars 7 forks source link

Fix dual source blending check #210

Closed dati91 closed 6 years ago

dati91 commented 6 years ago

With the latest gfx supporting dual source blending on metal, turns out our condition was not perfect for every case.

If the shader name contains 'dual_source_blending', that means it already passed the feature check.

kvark commented 6 years ago

You should still make sure that the feature is supported before enabling it.

dati91 commented 6 years ago

You should still make sure that the feature is supported before enabling it.

https://github.com/szeged/webrender/blob/8ba94ec1a55381fe455ad915b5625ea7fcaf1d1e/webrender/src/renderer.rs#L1222-L1223

We only create a pipeline with a shader named "dual_source_blending" if dsb is supported.