Draw Call Performance, OpenCL Batching & Shader Questions

about everything
  • Author
  • Message
Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Draw Call Performance, OpenCL Batching & Shader Question

Second results with rocks only is more correct for this bottleneck testing, i did it here some time ago, but topic was deleted automatically (now i changed forum setting, this will not happen). In it, all tested AMD (including laptops) had 6-8 fps, while intel 13-28 depending from motherboard, cpu type and frequency. Of course these results are good only for badly optimized games when many objects are drawed on screen, like Fallout 4, some places of Skyrim, Assasin Creed, etc.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
User avatar
*sensei*
Posts: 316
Joined: 12 Aug 2013, 18:55
Location: Scotland

Re: Draw Call Performance, OpenCL Batching & Shader Question

ENBSeries wrote:Second results with rocks only is more correct for this bottleneck testing, i did it here some time ago, but topic was deleted automatically (now i changed forum setting, this will not happen). In it, all tested AMD (including laptops) had 6-8 fps, while intel 13-28 depending from motherboard, cpu type and frequency. Of course these results are good only for badly optimized games when many objects are drawed on screen, like Fallout 4, some places of Skyrim, Assasin Creed, etc.
Good to know. What was odd in the test with both ships and rocks, was that the NVidia driver thread used twice as much CPU time than AMD's. Compared in Process Explorer, and the driver thread was using 00.25% of my CPU (quad core, so 0.50% for parity with the Pentium). On the Pentium, NVidia was at 01.00% usage of the CPU. This is due to NVidia having the GPU scheduler done in software, right?

I'm curious now; does NVidia use less CPU (lower overhead) in Direct3D 9 games, like Oblivion or Skyrim, than AMD cards? I figured that it was only in D3D11 that NVidia was more efficient, due to supporting Driver Command Lists for certain games.
_________________
Intel i7 6700k | AMD Vega 56 8GB | 2x16GB DDR4 @ 3000mhz | Windows 7 64bit | Creative Soundblaster X-Fi Titanium Fatal1ty Pro | Asus z170 Pro Gaming

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Draw Call Performance, OpenCL Batching & Shader Question

No idea
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
User avatar
*sensei*
Posts: 316
Joined: 12 Aug 2013, 18:55
Location: Scotland

Re: Draw Call Performance, OpenCL Batching & Shader Question

Got a wee question about how rendering works with the 2D APIs, as Google yielded no information about this.

How are objects drawn in DirectDraw and Direct2D? Are they essentially all batched and then drawn, or do those APIs also issue draw calls like the 3D APIs? And if so, how much faster/slower are they at being processed in the driver than in Direct3D 9 or 11?
_________________
Intel i7 6700k | AMD Vega 56 8GB | 2x16GB DDR4 @ 3000mhz | Windows 7 64bit | Creative Soundblaster X-Fi Titanium Fatal1ty Pro | Asus z170 Pro Gaming

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Draw Call Performance, OpenCL Batching & Shader Question

I dont know anything about Direct2D and other new things like that, because it's not my area and they are rarely used in general as i can see. I worked with DirectDraw only in the beginning of 2000, it was just a part of DirectX which deeply connected to 3d, but later in DX8+ it was separated. There is nothing special about it, just some simple operations like copying between different surfaces, i doubt this differ by performance from similar operations using d3d and because they are also commands to videocard, they suffer the same issues with delays, but should be faster because no need some complicated stuff. If somebody want to make 2d game which draw huge amount of sprites on the screen without optimization, then i think at some moment it is better to do it on cpu, depends from how many sprites are and their size. If it's possible to optimize by batching and atlases, then draw via 3d should be faster and more flexible.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
User avatar
*sensei*
Posts: 316
Joined: 12 Aug 2013, 18:55
Location: Scotland

Re: Draw Call Performance, OpenCL Batching & Shader Question

I found something really interesting.

There's a project that has a wrapper for Direct3D 9 to translate it into Vulkan, and it is bringing significant performance boosts despite being in very early stages. There's a video of a user getting an additional 50fps in Guild Wars 2 when using it: https://www.youtube.com/watch?v=2B4rYPjzOPg

Here's the github: https://github.com/Joshua-Ashton/d9vk

Tried it with Fallout New Vegas, and it didn't cause it to crash when using it's d3d9.dll as a proxy through enblocal.ini.

I asked a long time ago if wrapping D3D9 and older APIs to D3D11 would bring performance gains, and you said it did. How does that work? Is it merely intercepting the calls to the D3D9 driver before they're processed at all, or does the interception need to be done after rudimentary processing? And, curiously, would there be potential optimizations for ENB to use the wrapper? I remember a significant problem with making advanced effects is that you need to redraw objects, due to not all the data for the renderer being available to ENB, and Vulkan ought to reduce the performance impact of that.

Another question I have, is about shader models and CPU performance. A common optimization for Oblivion, Fallout 3, and New Vegas, is to force them to use shader model 3 by renaming the shader packages, which yields a few frames in draw call heavy scenes. Is this due to SM 3 being designed more efficiently, so the driver has less work?
_________________
Intel i7 6700k | AMD Vega 56 8GB | 2x16GB DDR4 @ 3000mhz | Windows 7 64bit | Creative Soundblaster X-Fi Titanium Fatal1ty Pro | Asus z170 Pro Gaming

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Draw Call Performance, OpenCL Batching & Shader Question

Shaders 2.0 vs 3.0 differ not so much and same by performance on videocard of last 12 years for sure. But 2.0 shaders have limit in length of operations, bethesda ignored extra feature of 2_x shader model which remove this limitation (i don't know who gonna play the game with hardware which support only 2.0, it's too slow), so they draw some objects several times with blending to screen, while with 3.0 shaders can draw just once each object (but if i remember, they still some object draw several times).

Wrapping functions from d3d9 to any other is just happening inside wrapper, not on driver side. dx9 is badly optimized and M$ instead to do things right, put in papers information of how slow calls of functions are and that developers must avoid drawing many objects visible on screen. It's purely cpu side issue. Dx11 was improved about this, but Vulkan is even more superior at such dip performance issue, so many games which very slow and not well optimized (Assasin Creed Unity and many others as example) can work much faster. Skyrim too, it have many places where this problem is performance killer, but sadly engine also have it's own costs to prepare objects to drawing and this near the same to dx9 draw calls costs. So using wrapper to faster api may work very nice or barely visible, depends from several factors.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7
Post Reply