Skip to content

Commit 65c1f88

Browse files
committed
formatting fixes that will hopefully help with html view
1 parent 7a72e28 commit 65c1f88

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

d3d/PartialGraphicsPrograms.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ Partial programs can be defined as:
5959
- 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.
6060

6161
## Pre-rasterization shaders partial program
62+
6263
This partial program includes:
64+
6365
Subobject type | Is it required? | Notes
6466
--------- | ---------- | ----------
6567
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
7274
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)
7375

7476
## Pixel shader partial program
77+
7578
This partial program includes:
79+
7680
Subobject type | Is it required? | Notes
7781
--------- | ---------- | ----------
7882
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
99103
[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.
100104

101105
---
106+
102107
# API
103108

104109
## Device Methods
110+
105111
Per D3D12 device interface semantics, these device methods can be called by multiple threads simultaneously.
106112

107113
### CheckFeatureSupport
@@ -222,6 +228,7 @@ Members | Description
222228
`BOOL IsPrimitive` | Set to `True` if this element is a primitive.
223229

224230
## D3D12_PRERASTERIZATION_OUTPUT_LINKAGE_SIGNATURE_DESC
231+
225232
```cpp
226233
typedef
227234
struct D3D12_PRERASTERIZATION_OUTPUT_LINKAGE_SIGNATURE_DESC
@@ -258,12 +265,10 @@ Members | Description
258265
`BYTE ComponentCount` | The number of components of the entry to write out to.
259266
`BOOL IsPrimitive` | Set to `True` if this element is a primitive.
260267

261-
262268
**TODO (Add a helper in d3dx that helps generate the linkage desc from a pair of example shaders. So apps don't have to make these by hand.)**
263269

264-
265-
266270
## D3D12_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS
271+
267272
```cpp
268273
typedef
269274
struct D3D12_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS
@@ -272,13 +277,14 @@ struct D3D12_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS
272277
BOOL LateLinkInputLayoutSubobject;
273278
} D3D12_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS;
274279
```
280+
275281
Members | Description
276282
------ | ----------
277283
`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.
278284
`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.
279285

280-
281286
## D3D12_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS
287+
282288
```cpp
283289
typedef
284290
struct D3D12_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS
@@ -316,7 +322,9 @@ Members | Description
316322
# DDI
317323

318324
## D3D12DDI_STATE_SUBOBJECT_TYPE
325+
319326
Below is a pruned list of the subobject types relevant to partial programs:
327+
320328
```cpp
321329
typedef enum D3D12DDI_STATE_SUBOBJECT_TYPE
322330
{
@@ -399,6 +407,7 @@ typedef struct D3D12DDI_PRERASTERIZATION_OUTPUT_LINKAGE_ELEMENT_DESC_0121
399407
```
400408

401409
## D3D12DDI_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS_0121
410+
402411
```cpp
403412
typedef
404413
struct D3D12DDI_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS_0121
@@ -409,6 +418,7 @@ struct D3D12DDI_PRERASTERIZATION_SHADERS_PARTIAL_PROGRAM_FIELDS_0121
409418
```
410419

411420
## D3D12DDI_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS_0121
421+
412422
```cpp
413423
typedef
414424
struct D3D12DDI_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS_0121
@@ -430,13 +440,15 @@ struct D3D12DDI_PIXEL_SHADER_PARTIAL_PROGRAM_FIELDS_0121
430440
# Reporting Partial Graphics Programs Support
431441

432442
## D3D12DDI_PARTIAL_GRAPHICS_PROGRAMS_TIER
443+
433444
```cpp
434445
typedef enum D3D12DDI_PARTIAL_GRAPHICS_PROGRAMS_TIER
435446
{
436447
D3D12DDI_PARTIAL_GRAPHICS_PROGRAMS_TIER_NOT_SUPPORTED = 0,
437448
D3D12DDI_PARTIAL_GRAPHICS_PROGRAMS_TIER_1_0 = 10,
438449
} D3D12DDI_PARTIAL_GRAPHICS_PROGRAMS_TIER;
439450
```
451+
440452
Level of partial graphics programs support. Currently all or nothing.
441453
This is the `PartialGraphicsProgramTier` member of `D3D12DDI_OPTIONS_DATA_PARTIAL_GRAPHICS_PROGRAMS`.
442454

@@ -447,6 +459,7 @@ For state objects, when shaders are introduced as part of collections there is a
447459
To support what is described above flags are added to the state object, these flags are described below.
448460

449461
## State Object Flag
462+
450463
```cpp
451464
typedef enum D3D12_STATE_OBJECT_FLAGS
452465
{
@@ -480,6 +493,7 @@ Full specialization | Improvement in performance
480493
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.
481494
482495
# History
496+
483497
| Date | Notes |
484498
| -------- | ------- |
485499
| **04/11/2025** | Split out partial programs into its own spec. |

0 commit comments

Comments
 (0)