microsoft / angle

ANGLE: OpenGL ES to DirectX translation
Other
615 stars 166 forks source link

Enable instancing on Windows Phone #16

Closed amerkoleci closed 9 years ago

amerkoleci commented 10 years ago

I've saw in one of your commit you've removed instancing for feature level 9.3, I think this should be handled soon as most code probably depends of this feature.

Thanks, Amer

austinkinross commented 10 years ago

Hi Amer,

Thanks for the feedback. Adding support for instancing on 9.3 is high on our list of priorities. We had to restrict instancing on 9.3 due to hardware limitations, but we understand the limitations and believe we can work around them. We plan to investigate this further in the near future.

Thanks again, Austin

amerkoleci commented 10 years ago

Windows Phone 8.1 supports hardware instancing so its not limitation to hardware.

Thank you for feedback, Amer

austinkinross commented 10 years ago

You're correct, 9.3 hardware does supports instancing. However, the first input in the InputLayout (equivalent to an "attribute" in OpenGL ES) must contain per-vertex data, and not per-instance data.

As a result, ANGLE needs to know which attributes are per-vertex and which are per-instance when it creates/compiles its D3D shaders. This is not the case in OpenGL ES, where apps can set attributes to be per-instance (via glVertexAttribDivisor) after creating/compiling their shaders.

We're aware of these problems and will investigate soon.

Thanks, Austin

austinkinross commented 9 years ago

Hi Amer, we've just added support for instancing on Feature Level 9.3! It should now work unconditionally on any Windows Phone.