Thursday, September 19, 2013

At last! Chrome D3D11 day has come!

As of revision 223716, Chrome Canary will have the ability to use Direct3D 11 (via ANGLE) as the rendering backend! Woot woot! The new backend can be enabled using the "Enable D3D11" flag in about:flags. To tell which backend you are using visit about:gpu and look for the GL_RENDERER string.

That's cool, but should have no impact whatsoever on your day to day Chrome use (and if it does, we want to hear about it!) So why do I bring it up? Because along with the shiny new backend comes a much awaited WebGL feature: Multiple render targets! This extension has been available to Mac and Linux devs for a little while now (it's still behind the Draft Extensions flag), but had some spec issues that prevented it from being implemented in the ANGLE D3D9 backend. Now with the new D3D11-based backend the extension should be available to a much wider range of developers.

(Want to know if you have it? Look for "WEBGL_draw_buffers" in the supported extensions list on http://webglreport.com/)

So go, brave WebGL developers, and defer all your renderings for great justice!

[UPDATE: I initially said that the D3D11 backend may be enabled by default on some systems. Unfortunately that's not the case just yet, and I apologize for the error.]



6 comments:

  1. Why is Chrome still using ANGLE at all? Why not just use OpenGL? I understand the original motivation I think (inconsistent driver support for OpenGL), but isn't it true that those drivers have all been blacklisted by now anyway?

    ReplyDelete
    Replies
    1. You underestimate the abysmal quality of Windows OpenGL drivers. :) The drivers for your NVIDIA and AMD gaming cards are fine, though still typically of lower quality than their D3D counterparts. The real problem is the vast hoards of integrated chipsets that barely have shaky OpenGL 2.0 support and will never see another driver update. Chrome still needs to run on those devices, and even if we ignore WebGL the browser still wants to make use of the GPU for standard page rendering. Thus we need the ANGLE backend to take advantage of the best drivers available for these chips.

      Once you've committed to supporting the ANGLE path it's hard to justify jumping through a bunch of autodetection hoops to try and decide if a given hardware configuration would be better off using the OpenGL path instead. ANGLE works well enough that it makes sense to simply use it as the default on all Windows devices and be done with it.

      Delete
    2. Ah, that makes sense, I wasn't considering the non-WebGL GPU compositing. It sure does make it harder to support new extensions though, and the extra overhead of DX API + ANGLE is pretty painful compared to the OpenGL implementation on the Mac. Also those shader compile times on Windows are atrocious.

      Delete
    3. I would dispute that the quality of the NV OGL driver doesn't compete with the quality of any driver. AMD's OGL driver though...

      Delete
  2. From the linked CL it looks like you have to pass --enable-d3d11 (i.e. no one is getting it by default)? Or is that set automatically somewhere else?

    ReplyDelete
    Replies
    1. You are correct. I was initially mis-informed about the effects of the patch and haven't had a chance to update the blog yet.

      Delete