Direct3D feature levels discussion

Discussion in 'Rendering Technology and APIs' started by DmitryKo, Feb 20, 2015.

  1. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    AMD Radeon Crimson 17.x does support WDDM 2.2 - you can tell by checking the first two digits of the driver version (2.2 is supposedly for Windows Mixed Reality, but the docs are not available yet).

    Not sure where DXDiag takes WDDM version from - there are no public APIs to query this, it's just tied to the specific OS release and/or SP level since Windows 7 SP1.

    Each successive WDDM iteration offers a few updated DXGK DDI callbacks and expanded structures, and the driver is expected to handle whatever version is available in the current OS environment - that's why there are separate driver packages for Windows 7 (WDDM 1.1), Windows 8.1 (WDDM 1.2/1.3) and Windows 10 (WDDM 2.0/2.1/2.2). But I doubt AMD driver would use separate code paths for very minor chip revisions such as GCN1/2.
     
    #841 DmitryKo, Sep 13, 2017
    Last edited: Sep 15, 2017
    Malo likes this.
  2. swaaye

    swaaye Entirely Suboptimal
    Legend Subscriber

    Joined:
    Mar 15, 2003
    Messages:
    8,294
    Likes Received:
    460
    Location:
    WI, USA
    Yeah it was DXDiag that showed WDDM 2.1. I haven't had the notebook for weeks though so can't double check anything.
     
  3. Ethatron

    Regular Subscriber

    Joined:
    Jan 24, 2010
    Messages:
    809
    Likes Received:
    203
    There kind of is. Every DXGI version adds new Interface revisions like IDXGIDevice1/2/... (not nessesarily that one but you get the idea). You just query the interface you want to probe for and then you can imply the overall supported version. There is no DXGI version without added functionality that I know of, so you can test for all of them in some [granted] convoluted way.
     
  4. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    Yes, but these APIs are for the application programmer, defined in the Windows SDK - and driver development is served by the separate Windows Driver Kit.

    WDDM display drivers have a kernel-mode driver - which typically calls the kernel-mode display miniport driver which in turn calls the DirectX graphics kernel (DXGK) - for handling lowest-level tasks such as resource/memory/power management and device I/O, and higher-level tasks like actual rendering and shader processing are done in the user-mode display driver, which talks to Direct3D/DXGI runtime which in turn actually exposes the APIs defined in the SDK.

    These low-level C-style DXGK interfaces have nothing in common with "lightweight COM" DXGI interfaces.

    Well, Windows Driver Kit documentation provides some helper functions/structures (in particular D3DKMTOpenAdapterFromLuid() / D3DKMT_OPENADAPTERFROMLUID, D3DKMTQueryAdapterInfo() / D3DKMT_QUERYADAPTERINFO, and D3DKMT_DRIVERVERSION) which are used by the user-mode OpenGL driver to query the display miniport for WDDM version supported by the kernel-mode driver, but I'm not sure if these are callable from desktop/UWP applications (i.e. the Win32 subsystem)... I guess I need to install the WDK and find out.
     
    #844 DmitryKo, Sep 14, 2017
    Last edited: Sep 14, 2017
    BRiT likes this.
  5. Ethatron

    Regular Subscriber

    Joined:
    Jan 24, 2010
    Messages:
    809
    Likes Received:
    203
    Sorry, maybe this was a typo:

    I just tried to explain how to "query" the DXGI level.
    As I'm not dealing or having dealt or will deal with DXGK or WDDM directly I don't know anything about it, thank you for the information.
     
  6. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    New in Windows 10 WDK Preview and SDK Preview RS3:
    Preview RS3 SDK is available from https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK
     
    #846 DmitryKo, Sep 15, 2017
    Last edited: Sep 20, 2017
    Lightman likes this.
  7. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    I only mentioned DXGI because it is the lowest-level graphics API in Windows SDK and is often cited in tandem with WDDM in "what's new" MSDN docs.

    Yes, applications are supposed to query IDXGFactory* for a supported interface rather than perform OS version check or component check, so IDXGIAdapter*.GetDesc* methods do not report WDDM version...
     
    #847 DmitryKo, Sep 15, 2017
    Last edited: Sep 16, 2017
  8. Alessio1989

    Regular Newcomer

    Joined:
    Jun 6, 2015
    Messages:
    540
    Likes Received:
    255
    So, we are going to have video decoding under Direct3D 12 too?
     
  9. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    Yes, a new header file d3d12video.h

    There is ID3D12VideoDevice->CheckFeatureSupport() method with 12 parameter blocks to query (D3D12_FEATURE_VIDEO enumeration and D3D12_FEATURE_DATA_VIDEO_* structures), but AFAIK they mostly describe supported video decoding formats and decoder parameters, so the support matrix would be enormous... I might add some essential info on the supported video formats but this depends on Microsoft releasing the updated SDK documentation.
     
    pharma likes this.
  10. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    I have updated my console tool to support D3D12_FEATURE_D3D12_OPTIONS3 and D3D12_FEATURE_EXISTING_HEAPS, available in Windows 10 Fall Creators Update version 1709.

    Here's what WARP12 (Microsoft Basic Render Driver) currently reports in Windows 10 RS3 RTM (build 16299):
    Note that WARP12 includes experimental support for Shader Model 6_1, but no support for barycentrics.
     
    #850 DmitryKo, Sep 20, 2017
    Last edited: Oct 4, 2017
  11. Ext3h

    Regular Newcomer

    Joined:
    Sep 4, 2015
    Messages:
    309
    Likes Received:
    241
    "D3D12_FEATURE_EXISTING_HEAPS", is that what I think it is?

    The ability to finally say "map using THAT memory region, stop allocating new memory for my process and running into the the page fault interrupt" and "no, I don't want you to make another copy only so you can claim to be non-blocking at all cost"?

    Asking because the performance of the page fault interrupt triggered when a zero-page mapped memory address gets remapped to a real RAM page on first write access (and at least all DX11 map or subresource update methods always give you zero-paged memory, or at least perform an internal copy to such if the GPU isn't by chance idle) caused me a lot of headache.

    Inverse performance scaling on systems with too many cores (that's the horrible part, hooray for using a spin lock...), but even in best case I couldn't upload more than 2-3GB / second to the GPU due to overhead from the page faults. Even with a hack like aplying VirtualLock+VirtualUnlock, I still couldn't get beyond 5-8GB / second, still bound by the speed at which the page table could be updated (VirtualLock triggers the mapping from zero page to real RAM eagerly without relying on the interrupt, but it's still somewhat slow).

    If that feature flag indicates what I think it does, then uploads at full PCIe 3.0 16x speeds should become possible at last. Tremendously helpful if you want to shovel data from one GPU to the next.

    EDIT: Nope, just import functions for pre-baked resource heaps. Has nothing to do with the broken design of the map functions.
     
    #851 Ext3h, Sep 21, 2017
    Last edited: Oct 1, 2017
  12. Alessio1989

    Regular Newcomer

    Joined:
    Jun 6, 2015
    Messages:
    540
    Likes Received:
    255
    I really hope so... Let's see how much architectures will support that..
     
  13. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    This feature is exposed by two new methods, ID3D12Device3::OpenExistingHeapFromAddress and ID3D12Device3::OpenExistingHeapFromFileMapping - not sure if this really does away with copy overhead though...

    Code:
    virtual HRESULT STDMETHODCALLTYPE OpenExistingHeapFromAddress(
    _In_  const void *pAddress, REFIID riid, _COM_Outptr_  void **ppvHeap) = 0;
    
    virtual HRESULT STDMETHODCALLTYPE OpenExistingHeapFromFileMapping(
    _In_  HANDLE hFileMapping, REFIID riid, _COM_Outptr_  void **ppvHeap) = 0;
     
    #853 DmitryKo, Sep 21, 2017
    Last edited: Sep 22, 2017
  14. Ext3h

    Regular Newcomer

    Joined:
    Sep 4, 2015
    Messages:
    309
    Likes Received:
    241
    No, doesn't look like it, just an interface to load entire ready-made heaps at once. Once again with a guaranteed copy.

    Sorry for getting the hopes up.
     
  15. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
  16. Malo

    Malo YakTribe.games
    Legend Veteran Subscriber

    Joined:
    Feb 9, 2002
    Messages:
    5,895
    Likes Received:
    1,901
    Location:
    Pennsylvania
    GeForce 970 on 387.68. Windows Insider Build 16291

    Code:
    CopyQueueTimestampQueriesSupported : 1
    CastingFullyTypedFormatSupported : 1
    WriteBufferImmediateSupportFlags : D3D12_COMMAND_LIST_SUPPORT_FLAG_DIRECT | BUNDLE | COMPUTE | COPY (15) (0b0000'1111)
    ViewInstancingTier : D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED (0)
    BarycentricsSupported : 0
    ExistingHeaps.Supported : 1
     
    DavidGraham and DmitryKo like this.
  17. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
    Thank you! Could you please check if enabling experimental shader models (checkfeatures_experimental.cmd) makes any difference? What are the highest shader models reported in both cases?

    I'm puzzled as to why WARP12 reports SM6_1 in experimental mode but doesn't set the BarycentricsSupported bit in D3D12_OPTIONS3.
    As far as I understand, Shader Model 6.1 and DXIL 1.1 support for barycentric coordinates (SV_Barycentric) is unconditional... maybe this cap bit is intended only for SM6.0 code?
     
  18. Malo

    Malo YakTribe.games
    Legend Veteran Subscriber

    Joined:
    Feb 9, 2002
    Messages:
    5,895
    Likes Received:
    1,901
    Location:
    Pennsylvania
    Do I need to do something to enable it?

     
  19. DmitryKo

    Regular

    Joined:
    Feb 26, 2002
    Messages:
    475
    Likes Received:
    236
    Location:
    55°38′33″ N, 37°28′37″ E
  20. Malo

    Malo YakTribe.games
    Legend Veteran Subscriber

    Joined:
    Feb 9, 2002
    Messages:
    5,895
    Likes Received:
    1,901
    Location:
    Pennsylvania
    Highest shader model is now 6.1 in developer mode

    Code:
    HighestShaderModel : D3D12_SHADER_MODEL_6_1 (0x0061)
    ViewInstancingTier now listed as supported as Tier 1 instead of not supported.
     
    DmitryKo likes this.

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...