You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: d3d/PartialGraphicsPrograms.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,9 @@ Partial programs can be defined as:
59
59
- A partial program combining pre-rasterization and pixel shaders, later used with other state subobjects to form a full program. In that case, the two tables below effectively become combined (i.e. you can specify any subobject in either table), except that the output linkage subobjects become invalid, since they can be deduced from the provided shaders. The use case for declaring a combined partial program like this is to allow some of the other fixed-function state to vary without worrying about it impacting shader compilation.
60
60
61
61
## Pre-rasterization shaders partial program
62
+
62
63
This partial program includes:
64
+
63
65
Subobject type | Is it required? | Notes
64
66
--------- | ---------- | ----------
65
67
Primitive topology | Yes, excluding MS | If specified for a mesh shader then it must match the topology specified in the shader code.
@@ -72,7 +74,9 @@ Input layout | Optional
72
74
Index buffer strip cut value | Optional | This can be specified in the pre-rasterization partial program or included in the full graphics program specification. If not present in either the driver will assume [default value](https://github.com/microsoft/DirectX-Specs/blob/master/d3d/WorkGraphs.md#missing-index_buffer_strip_cut_value)
73
75
74
76
## Pixel shader partial program
77
+
75
78
This partial program includes:
79
+
76
80
Subobject type | Is it required? | Notes
77
81
--------- | ---------- | ----------
78
82
Shader | Yes | This is used to define the pixel shader. The shader can be present in the state object directly or indirectly using an existing collection.
@@ -99,9 +103,11 @@ A graphics generic programs can be defined using partial graphics programs. To r
99
103
[generic program desc](https://microsoft.github.io/DirectX-Specs/d3d/WorkGraphs.html#d3d12_generic_program_desc). A partial graphics program is only allowed to be referenced by name, it can't be added as a subobject when specifying a generic program.
100
104
101
105
---
106
+
102
107
# API
103
108
104
109
## Device Methods
110
+
105
111
Per D3D12 device interface semantics, these device methods can be called by multiple threads simultaneously.
106
112
107
113
### CheckFeatureSupport
@@ -222,6 +228,7 @@ Members | Description
222
228
`BOOL IsPrimitive` | Set to `True` if this element is a primitive.
`ExcludePS` | Specifies whether the pre-rasterization shaders partial program is going to be linked with a pixel shader or not. A partial program with `ExcludePS` can only be used in a generic program that doesn't include a pixel shader.
278
284
`LateLinkInputLayoutSubobject` | Specifies whether the pre-rasterization shaders partial program input layout subobject will be late linked. When it is set to false that means that when the subobject is not available in the pixel shader partial program then, the driver will use default values.
279
285
280
-
281
286
## D3D12_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS
287
+
282
288
```cpp
283
289
typedef
284
290
structD3D12_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS
@@ -316,7 +322,9 @@ Members | Description
316
322
# DDI
317
323
318
324
## D3D12DDI_STATE_SUBOBJECT_TYPE
325
+
319
326
Below is a pruned list of the subobject types relevant to partial programs:
Level of partial graphics programs support. Currently all or nothing.
441
453
This is the `PartialGraphicsProgramTier` member of `D3D12DDI_OPTIONS_DATA_PARTIAL_GRAPHICS_PROGRAMS`.
442
454
@@ -447,6 +459,7 @@ For state objects, when shaders are introduced as part of collections there is a
447
459
To support what is described above flags are added to the state object, these flags are described below.
448
460
449
461
## State Object Flag
462
+
450
463
```cpp
451
464
typedefenum D3D12_STATE_OBJECT_FLAGS
452
465
{
@@ -480,6 +493,7 @@ Full specialization | Improvement in performance
480
493
Prefer minimal link with background specialization | This flag should provide faster state object creation first, with an indication that the cache is being used, then when a full specialized version is introduced, the performance should improve. If we need a signal from the driver to know when a full specialized version was added, we can add a call back function.
481
494
482
495
# History
496
+
483
497
| Date | Notes |
484
498
| -------- | ------- |
485
499
| **04/11/2025** | Split out partial programs into its own spec. |
0 commit comments