Windows 10 显示器和图形驱动程序的新增功能What's new for Windows 10 display and graphics drivers

本页介绍适用于 Windows 10 版本2004(WDDM 2.7)的显示和图形驱动程序中的新增功能。This page describes what's new in display and graphics drivers for Windows 10, version 2004 (WDDM 2.7). 若要查看在以前版本的 WDDM 2.x 中添加的功能,请参阅之前的 wddm 2.x 版本的新增功能。To see features added in previous versions of WDDM 2.X, see What's new for prior WDDM 2.X versions.

网格着色器Mesh Shaders

网格着色器是在使用光栅化时提高 Direct3D 12 图形管道的灵活性和性能的一种方法。Mesh shaders are a means of increasing the flexibility and performance of Direct3D 12's graphics pipeline when using rasterization. 它们作为输入汇编程序(特别是顶点和几何着色器阶段)的新替代,将一些输入汇编程序的固定函数行为替换为灵活函数的行为。They act as a new replacement for the input assembler — in particular, vertex and geometry shader stages — replacing some of the input assembler's fixed-function behavior with flexible-function behavior. 使用网格着色器,应用程序可以更早、更有效地应用于输入汇编程序。With mesh shaders, applications can apply culling earlier, and therefore more efficiently, than the input assembler. 可以剔除基元,而不是由 GPU 处理索引数据,因为我们看到3D 应用程序的基元计数随着时间的推移越来越高和更高。Primitives can be culled without having their index data processed by the GPU, which is highly beneficial as we see the primitive counts of 3D applications getting higher and higher over time.

如果附加了一个像素着色器,则从网格着色器输出的基元将直接送入 "像素着色器" 阶段。In the case that there is a pixel shader attached, the primitives output from a mesh shader will feed directly into the pixel shader stage.

网格着色器功能引入了网格着色器阶段和新阶段:放大着色器。The mesh shader feature introduces the mesh shader stage along with a new stage: the amplification shader. Amplifications 着色器替换 GPU 分割阶段。Amplifications shaders replace the GPU tessellation stage. 应用程序将其放大着色器设置为根据需要调用网格着色器若干次。Applications set up their amplification shader to invoke a mesh shader some number of times as needed. 放大着色器是一个可选步骤,可让应用程序动态控制几何详细信息的级别。Amplification shaders are an optional step which allow an application to dynamically control levels of geometric detail.

网格着色器功能涉及新的底纹语言构造以及 UMD 的更改。The mesh shader feature involves new shading language constructs as well as UMD changes. 对于网格着色器的报表设备功能,有一个名为MeshShaderTier的字段,通过D3D12DDI_D3D12_OPTIONS_DATA_0073报告。For reporting device capability of mesh shaders, there's a field called MeshShaderTier reported through D3D12DDI_D3D12_OPTIONS_DATA_0073. 而且,由于这会引入两个新的着色器阶段,因此D3D12DDIARG_CREATE_PIPELINE_STATE_0075hMeshShaderhAmplificationShader中有两个新字段。And, since this introduces two new shader stages, there are two new fields in D3D12DDIARG_CREATE_PIPELINE_STATE_0075, hMeshShader and hAmplificationShader. 若要启动,请参阅 "DDI PFND3D12DDI_DISPATCH_MESH_0074的命令列表" 和 "间接调度D3D12DDI_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH "。To kick things off, there's the command list DDI PFND3D12DDI_DISPATCH_MESH_0074 and also D3D12DDI_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH for indirect dispatch.

DirectX Raytracing (DXR)1。1DirectX Raytracing (DXR) 1.1

WDDM 2.7 引入了一些新功能和改进功能,这些功能在 Direct3D 12 中的 DXR 的初始版本上生成。WDDM 2.7 brings along some new features and improvements which build on the initial release of DXR in Direct3D 12.

  • Inline raytracing 是 raytracing 的一种替代形式,不使用任何单独的动态着色器或着色器表。Inline raytracing is an alternative form of raytracing that doesn’t use any separate dynamic shaders or shader tables. 它为开发人员提供灵活性,在所有这些情况下,如果着色器使用 DXR 1.0 样式 raytracing,请将其称为 "基于动态着色器的 raytracing,不适合"。It gives the developer flexibility and some convenience in all those cases where shaders using DXR 1.0-style raytracing, call them "dynamic-shader-based" raytracing, don't fit. 可在任何着色器阶段(包括计算着色器、像素着色器等)中使用 Inline raytracing。Inline raytracing is available in any shader stage, including compute shaders, pixel shaders, and so forth. 此处所述的内容可用于 WDDM 2.7,尽管它不对应于 DDI 更改。This is being mentioned here as something available with WDDM 2.7, although it doesn't correspond to a DDI change.

  • 应用程序可以通过 ExecuteIndirect 调用 DispatchRays,从而允许在 GPU 上配置 raytracing 工作。Applications can call DispatchRays through ExecuteIndirect, allowing raytracing work to be configured on the GPU. 对于查找、排序或调整 raytracing 工作的应用程序,以及使用着色器执行此操作,这可能很有用。This could be useful for applications that seek to cull, sort, or adjust raytracing work and they use shaders for doing that. 接下来,现在有一个 D3D12DDI_INDIRECT_ARGUMENT_TYPE 枚举值。Going along with this, there is now a D3D12DDI_INDIRECT_ARGUMENT_TYPE enumeration value. 使用间接 raytracing 调度时,执行间接缓冲区的每个元素都是类型D3D12DDIARG_DISPATCH_RAYS_0054When using indirect raytracing dispatch, each element of the execute-indirect buffer is of type D3D12DDIARG_DISPATCH_RAYS_0054.

  • 创建管道状态以用于不同着色器组合的开销是3D 计算机图形中的一项困难问题。The overhead of creating pipeline state to account for different shader combinations is one of those difficult problems in 3D computer graphics. DXR 1.1 包含可帮助的内容:添加到状态对象。DXR 1.1 includes something that can help: add-to-state-object. AddToStateObject ()在 API 中公开时,使应用程序能够将着色器添加到具有 CPU 开销的现有状态对象,仅限于添加的内容。AddToStateObject(), as it is exposed in the API, allows applications to add shaders to an existing state object with CPU overhead proportional only to what is being added. 与此一起,有两个设备 DDI 函数: PFND3D12DDI_ADD_TO_STATE_OBJECT_0072和 PFND3D12DDI_CALC_PRIVATE_ADD_TO_STATE_OBJECT_SIZE_0072 * *] ( https://docs.microsoft.com/windows-hardware/drivers/ddi/d3d12umddi/nc-d3d12umddi-pfnd3d12ddi_calc_private_add_to_state_object_size_0072) 。Going along with this, there are two device DDI functions: PFND3D12DDI_ADD_TO_STATE_OBJECT_0072 and PFND3D12DDI_CALC_PRIVATE_ADD_TO_STATE_OBJECT_SIZE_0072**](https://docs.microsoft.com/windows-hardware/drivers/ddi/d3d12umddi/nc-d3d12umddi-pfnd3d12ddi_calc_private_add_to_state_object_size_0072).

对于常规功能报表,有一个新的枚举值D3D12DDI_RAYTRACING_TIER_1_1用于报表层1.1。For general capability-reporting, there's a new enumeration value D3D12DDI_RAYTRACING_TIER_1_1 used for reporting tier 1.1.

采样器反馈Sampler Feedback

采样器反馈是一项 Direct3D 12 功能,用于捕获和记录纹理采样信息和位置。Sampler Feedback is a Direct3D 12 feature for capturing and recording texture sampling information and locations. 如果没有采样器反馈,则这些详细信息对开发人员是不透明的。Without sampler feedback, these details would be opaque to the developer. 此功能使应用程序不仅可以知道采样了哪些 mip,还能了解在这些 mips 上的位置。This feature gives applications the ability to not just know what mip was sampled, but to know where on those mips. 应用程序可能对采样信息感兴趣,例如:Applications might be interested in sampling information, for example, to:

  • 准确了解在纹理流式处理系统中接下来要加载的内容,或accurately know what to load next in a texture streaming system, or
  • 准确了解需要在纹理空间着色渲染系统中为其着色的内容。accurately know what needs to be shaded in a texture-space-shading rendering system.

示例操作的反馈会写入 "反馈映射",它充当一种不透明资源,这类资源必须转码,才能获取 inspectable 的信息。与编写反馈本身一样,着色器模型6_5 中有 HLSL 的构造。Feedback of sample operations is written to a "feedback map" which acts as a kind of opaque resource which must be transcoded to get application-inspectable information out. As for the writing of feedback itself, there are HLSL constructs in shader model 6_5 for that. 语义非常类似于 Texture2D's 示例及其变体的语义。The semantics are very similar to the semantics for Texture2D's Sample and its variants.

虽然取样器反馈可以充分利用新的底纹语言构造,但它也涉及 UMD 的更改。While sampler feedback makes good use of new shading language constructs, it also involves UMD changes. 对于设备功能检查,有一个名为 "SamplerFeedbackTier" 的上限通过D3D12DDI_D3D12_OPTIONS_DATA_0073报告。For device-capability-checking, there's a cap called SamplerFeedbackTier reported through D3D12DDI_D3D12_OPTIONS_DATA_0073. 已将资源创建修改为采用D3D12DDI_MIP_REGION_0075类型的新字段 "采样器反馈" mip 区域。Resource creation has been revised to take a new field, the sampler feedback mip region, of type D3D12DDI_MIP_REGION_0075. 与此一起,还有一个新的描述符创建方法, PFND3D12DDI_CREATE_SAMPLER_FEEDBACK_UNORDERED_ACCESS_VIEW_0075Going along with this, there's also a new descriptor-creating method, PFND3D12DDI_CREATE_SAMPLER_FEEDBACK_UNORDERED_ACCESS_VIEW_0075.

内容保护Content Protection

在 WDDM 2.7 中,将可选的受保护资源支持添加到 Direct3D 12 视频操作。Optional protected resource support was added to Direct3D 12 video operations in WDDM 2.7. 对于后台,受保护的资源已存在于 WDDM 2.7 之前,但仅可用于跨 API 共享和图形或计算,而不能用于视频。For background, protected resources existed before WDDM 2.7, but were available only for cross-API sharing and graphics or compute, not video.

驱动程序不会将对受保护资源的支持作为全局内容进行报告;它基于每个操作。Support for protected resources is not reported by the driver as a global thing; it's on a per-operation basis. 如果驱动程序报告特定操作支持受保护的资源,则意味着操作可以读取和写入受保护的资源,并支持在资源类型允许的情况下进行跨 API 共享。If a driver reports supporting protected resources for a particular operation, that means that means that operation can read and write protected resources and supports cross-API sharing if the resource type allows for it. 值得一提的另一点是,如果驱动程序声明了特定格式的受保护资源支持,则它还必须支持将该格式作为非保护资源。Another thing worth mentioning is that if a driver claims protected resource support for a particular format, it must support that format as a non-protected resource too.

使用 WDDM 2.7,资源创建方法将被修改为采用可选的 D3D12DDI_HPROTECTEDRESOURCESESSION 实例。With WDDM 2.7, resource creation methods are modified to take an optional D3D12DDI_HPROTECTEDRESOURCESESSION instance. 在对象创建时为驱动程序提供此参数,以通知设置和分配。Drivers are given this parameter at object-creation time to inform setup and allocations. 此外,还会修改内存预算检查以指示该操作是否将使用受保护的资源。Further, the memory budget checks are revised to indicate whether or not the operation will use protected resources. 当受保护的资源会话参数为非 NULL 时,这表示该操作将写入受保护的资源。When the protected-resource-session parameter is non-NULL, this indicates that the operation will write to protected resources. 若要写入未受保护的资源,必须重新创建操作对象。To write to an unprotected resource, the operation object must be recreated.

如果输出是受保护的资源,则解码器和运动估计引用必须是受保护的资源。Decoder and motion estimation references must be protected resources when the output is a protected resource. 在写入受保护资源时,视频处理可能会从受保护和未受保护的资源的组合中进行读取。Video processing may read from a combination of protected and unprotected resources when writing to a protected resource.

在记录写入到受保护资源的一个或多个操作之前,必须使用非 NULL 受保护的资源会话调用PFND3D12DDI_SETPROTECTEDRESOURCESESSION_0030Before recording one or more operations that writes to a protected resource, PFND3D12DDI_SETPROTECTEDRESOURCESESSION_0030 must be called with a non-NULL protected resource session. 在记录写入到非保护资源的一个或多个操作之前,需要调用具有 NULL 的PFND3D12DDI_SETPROTECTEDRESOURCESESSION_0030Calling PFND3D12DDI_SETPROTECTEDRESOURCESESSION_0030 with NULL is required before recording one or more operations that write to non-protected resources.

若要了解有关 WDDM 2.7 中内容保护的上述第 DDI 更改的指导教程,请参阅D3D12DDI_VIDEO_DECODE_PROTECTED_RESOURCES_DATA_0072作为起点。To know more beyond the above guided tour of DDI changes for content protection in WDDM 2.7, see D3D12DDI_VIDEO_DECODE_PROTECTED_RESOURCES_DATA_0072 as a starting point.

改进了工具的历史缓冲区报告Improved History Buffer Reporting for Tools

WDDM 2.7 引入了 DDI 更改,使 GPU 调试工具可以使用历史缓冲区。WDDM 2.7 introduces a DDI change which benefits GPU debugging tools' use of history buffers. 进行此更改后,单个命令缓冲区提交可以包含与多个命令列表对应的工作,而不是一次只包含单个命令列表。With this change, a single command buffer submission can contain work corresponding to multiple command lists rather than just single command lists at a time. 此更改允许 GPU 调试工具更准确地报告应用程序的性能特征。This change allows GPU debugging tools to more accurately report applications' performance characteristics.

此功能通过 D3D12DDICAPS_TYPE_0073_SUPPORT_BATCHED_MARKERS 报告。This capability is reported through D3D12DDICAPS_TYPE_0073_SUPPORT_BATCHED_MARKERS. D3DDDIMLT_BATCHED 存在一个新的枚举值D3DDDI_MARKERLOGTYPE ,这对应于D3DDDI_BATCHEDMARKERDATAThere is a new D3DDDI_MARKERLOGTYPE of enumeration value D3DDDIMLT_BATCHED, which corresponds to D3DDDI_BATCHEDMARKERDATA. 当 ETW 事件数据结构的类型为 D3DDDIMLT_BATCHED 时,它已被 revved 为包含若干D3DDDI_BATCHEDMARKERDATA元素。ETW event data structures have been revved to contain some number of D3DDDI_BATCHEDMARKERDATA elements when they are of type D3DDDIMLT_BATCHED.

DisplayPort (DP) AUX/I2CDisplayPort (DP) AUX/I2C

DP 辅助(AUX)通道提供对 DP 配置数据(DPCD)的访问,它是一个每设备注册文件,用于读取 DP 设备的功能、链接定型、拓扑发现、I2C 总线访问等。The DP Auxiliary (AUX) channel provides access to DP Configuration Data (DPCD), which is a per-device register file used for reading the DP device's capabilities, link training, topology discovery, I2C bus access, and so forth. 请参阅DXGK_DP_INTERFACE作为起点。See DXGK_DP_INTERFACE as a starting point.