Comments on: Fill, Framerate, and Shooters https:/2012/01/fill-framerate-and-shooters/ Developer resources for the X-Plane flight simulator Tue, 31 Jan 2012 18:02:13 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Ben Supnik https:/2012/01/fill-framerate-and-shooters/#comment-4149 Tue, 31 Jan 2012 18:02:13 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4149 In reply to Adrian Wagner.

The only SIMD we use is SSE/SSE2 I think, which goes back a million years. SIMD isn’t going to be that useful to us because most SIMD-friendly code lives in libraries we use (e.g. OpenGL) and not in native sim code. Native sim code tends to be bottlenecked on L2 bandwidth and possibly branching.

]]>
By: Adrian Wagner https:/2012/01/fill-framerate-and-shooters/#comment-4135 Mon, 30 Jan 2012 19:51:27 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4135 Can you very briefly comment on Single Instruction, Multiple Data CPU instruction sets. Any advantage with a newer CPU?

]]>
By: Ben Supnik https:/2012/01/fill-framerate-and-shooters/#comment-4134 Mon, 30 Jan 2012 14:02:43 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4134 In reply to Filippo.

There are a few things OpenGL does that the DX guys can’t get access to. For example, in OpenGL you can use immediate mode vertex attributes as a quick way to do batching. (On many systems, attribute changes don’t need to be validated and simply get pushed into the GPU’s registers; this is faster than a uniform update, which requires some validation, possibly a buffer operation and changing some or all of the uniform window. The trade-off is that you lose some register space to the GPU, which can hurt fps if done too much. But the option is useful.) I am sure there are some DX tricks that OpenGL cannot do. But in the end the very fastest code paths are available to both.

]]>
By: Ben Supnik https:/2012/01/fill-framerate-and-shooters/#comment-4133 Mon, 30 Jan 2012 14:00:47 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4133 In reply to NLS.

The GPU isn’t particularly well suited for some of the CPU-centric tasks that can limit X-Plane’s framerate; they have to be solved by changing how we use the GPU.

]]>
By: Filippo https:/2012/01/fill-framerate-and-shooters/#comment-4131 Mon, 30 Jan 2012 10:22:15 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4131 In reply to NLS.

While portability in general is something that could hurt performances, in this particular context I think it is not really the case. Despite of different OSes, we are basically speaking about the same hardware (all of the mentioned systems – MacOS, Linux and Windows – run on the same x86 CPUs). If we wanted to have a software that is required to run on different hardware platforms things would obviously be different, in the sense that either the developer does NOT exploit hardware-specific optimizations to keep the code portable and gives up on performance front, or he/she duplicates the hardware-specific part of code for each targeted platform, at the expense of increased maintenance burden.

Concerning DirectX vs. OpenGL, this is a loooooong debate. All I can say is, while it is true that the recent GPUs are “crafted” around DirectX requirements, it is also true that feature wise OpenGL is not (any more) inferior to D3D, as Ben said.

All of this makes me think that supporting multiple platforms does not really hurt performances in X-Plane.

Best regards,
Filippo

]]>
By: NLS https:/2012/01/fill-framerate-and-shooters/#comment-4130 Mon, 30 Jan 2012 09:27:42 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4130 In reply to Ben Supnik.

Thanks for clearing this out.
Since you talk about CPU limits… why not use GPU partially for that role too? I mean it’s the trend now with CUDA, OpenCL and DirectCompute… Actually for our case only OpenCL (which is both VGA and OS “agnostic”). I don’t know if I am saying something stupid.

]]>
By: Ben Supnik https:/2012/01/fill-framerate-and-shooters/#comment-4129 Mon, 30 Jan 2012 02:15:50 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4129 In reply to NLS.

It does not impact optimization; OpenGL and D3D are at feature parity right now. There was a while during GL 3.0 where the GL spec fell behind the hardware; the GL 4 roll-out (which matches DX11, roughly) has been a lot more aggressive, probably due to pushback from the community regarding the GL 3 lag. This is all moot for us; we aren’t on the bloody edge of feature use, so even with minor latency we wouldn’t see an impact.

I am not aware of any driver paths that are better in D3D than OpenGL; they both have hot paths and cold paths, and in the end you always end up batch limited on the CPU side.

]]>
By: vonhinx https:/2012/01/fill-framerate-and-shooters/#comment-4127 Sun, 29 Jan 2012 11:58:53 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4127 In reply to Sir Andrew Milich.

Plane Maker – Miscellaneous Objects

]]>
By: NLS https:/2012/01/fill-framerate-and-shooters/#comment-4126 Sun, 29 Jan 2012 11:34:26 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4126 Ok I have a question. Doesn’t also impact optimization that X-Plane “has” to be a multiplatform product? Laminar is a “macpeople” company and you also publish X-Plane for Linux. Honestly wouldn’t things be better (development and optimization wise) if you just embrased the most popular platform? Which sorry to say, is Windows and DirectX. VGA cards are for years now way more optimized to Direct3D than OpenGL (except maybe workstation cards). AFAIK (I am not a gfx expert). Also AFAIK DirectX current implementation is way more feature filled than latest OpenGL.
So, without making this a Win-Mac flame war, just asking an expert for educated opinion, wouldn’t what I suggest make things simpler and “better” for the end product? I don’t expect it will change (LR is USA based and you guys have Apple almost like religion – been there and seen it) and this discussion never goes well in the forum, but still I am asking for as much UNBIASED opinion as I can get.

]]>
By: Ben Supnik https:/2012/01/fill-framerate-and-shooters/#comment-4125 Sun, 29 Jan 2012 00:29:12 +0000 http://xplanedev.wpengine.com/?p=3962#comment-4125 In reply to Sir Andrew Milich.

That is covered in the articles linked to in the post!

]]>