RI::createGraphicsPipeline¶
What it does¶
RI::createGraphicsPipeline(device, desc) compiles the shaders and all fixed-function state into a single pipeline object up front. RI never compiles a pipeline later while recording commands: what you create is what runs. Set the pipeline with cmdSetPipeline inside a rendering section, and destroy it with destroyPipeline.
GraphicsPipelineDesc fields:
vertex,pixel: shader bytecode (SPIR-V on Vulkan, DXIL on D3D12) with entry pointmain. Leavepixelempty for a depth-only pipeline.hull,domain: tessellation shaders, compiled with profileshs_6_6andds_6_6(Vulkan calls them tessellation control and evaluation shaders). Provide both or neither. When provided, settopologytoTopology::ePatchListandpatchControlPointsbetween 1 and 32; the GPU must also reportDeviceLimits::tessellation.geometry: a geometry shader (gs_6_6), which runs after the vertex shader (or after the domain shader when tessellation is active). The GPU must reportDeviceLimits::geometryShaders. Geometry shaders are slow on AMD and NVIDIA, so mesh or compute shaders usually do the same work faster; they remain useful for ports and for layered rendering, such as drawing all six faces of a cube texture in one draw usingSV_RenderTargetArrayIndex.task,mesh: a mesh pipeline provides a mesh shader (ms_6_6) instead ofvertex, and optionally a task (amplification) shader (as_6_6) before it. Draw withcmdDrawMesh;topologyis ignored because the mesh shader declares its own output topology. The GPU must reportDeviceLimits::meshShaders.colorFormats,depthFormat,samples: the attachment formats and sample count the pipeline renders to. They must match the rendering section where the pipeline is used.topology:eTriangleList(default),eTriangleStrip,eLineList,eLineStrip,ePointList, orePatchList(for tessellation). Points are one pixel and lines are one pixel wide on both backends because D3D12 has no point size or line width; draw quads for larger points (sprites) or thick lines.fill:eSolid(default) oreWireframe, which draws triangle edges as lines.cull:eNone(default),eFront, oreBack.frontCounterClockwiseselects which triangle winding faces the camera (clockwise by default on both backends).depth:testenables comparing against the depth attachment,writestores the new depth, andcomparesets the comparison operator (CompareOp::eLessby default).depthBias: added to each fragment's depth before the depth test to reduce shadow acne. It computesconstant * r + slope * (triangle depth slope), clamped in magnitude toclamp(0means no limit), whereris the smallest representable depth step of the format.constantis an integer because D3D12 takes an integer. Like all pipeline state, depth bias is fixed: two different biases require two pipelines.depthClamp: clamps fragment depth to0..1instead of clipping triangles beyond the near and far planes, which is useful for shadow maps when objects sit behind the light's near plane.stencil:testenables the stencil test, with onereadMaskand onewriteMaskshared by both faces (matching D3D12), areferencevalue, and per-face (front,back) operations (fail,depthFail,pass) andcomparefunction. The pipeline'sreferenceis the default:cmdSetStencilReferenceoverrides it inside a rendering section so one pipeline can tag different objects with different values.blend: either empty (every color target is written as is) or oneBlendStateper entry incolorFormats. EachBlendStateconfiguresenable, separate color and alpha factors and operations (result = src * srcFactor (op) dst * dstFactor;BlendOp::eMinandBlendOp::eMaxignore the factors), and aColorMask(writeMask) of channels to write.
There is no vertex input: vertex shaders pull their data from buffers using SV_VertexID (indexed draws pass the index as SV_VertexID, see cmdDrawIndexed).
Classic stages run in the order vertex → hull → domain → geometry → pixel (mesh pipelines run task → mesh → pixel). Every stage sees the same EQ_ROOT_DATA block, and pipeline.rootDataSize reports its size in bytes.
Signature¶
// <RI/RI.hpp>, namespace RI
Pipeline createGraphicsPipeline(Device &device, const GraphicsPipelineDesc &desc);
// <RI/RI.hpp>, namespace RI
struct GraphicsPipelineDesc {
Bytecode vertex; // entry point "main"; empty for mesh pipelines
// Tessellation (DeviceLimits::tessellation): hull and domain shaders
// together, with Topology::ePatchList. Vulkan: tessellation control and
// evaluation shaders.
Bytecode hull;
Bytecode domain;
Bytecode geometry; // DeviceLimits::geometryShaders
Bytecode pixel; // entry point "main"; may be empty for depth-only pipelines
// Mesh pipelines (P39, DeviceLimits::meshShaders): a mesh shader instead
// of `vertex`, and an optional task (amplification) shader before it.
// Drawn with cmdDrawMesh; `topology` is the mesh shader's.
Bytecode task;
Bytecode mesh;
std::vector<Format> colorFormats;
Format depthFormat = Format::eUndefined;
uint32 samples = 1;
Topology topology = Topology::eTriangleList;
uint32 patchControlPoints = 0; // 1..32 with Topology::ePatchList
FillMode fill = FillMode::eSolid;
CullMode cull = CullMode::eNone;
bool frontCounterClockwise = false;
DepthState depth;
DepthBias depthBias;
bool depthClamp = false; // clamp depth to 0..1 instead of clipping
StencilState stencil; // needs a depth format with stencil
// One per color format, or empty: every target written as is.
std::vector<BlendState> blend;
std::string_view name; // empty: unnamed (P106)
};
From the header: Complete state up front (P38). No vertex input: vertices are pulled from buffers in the shader (P39), or produced by mesh shaders. Stages run vertex -> hull -> domain -> geometry -> pixel.
| Field | Type | Default | Description |
|---|---|---|---|
vertex |
Bytecode |
entry point "main"; empty for mesh pipelines | |
hull |
Bytecode |
Tessellation (DeviceLimits::tessellation): hull and domain shaders together, with Topology::ePatchList. Vulkan: tessellation control and evaluation shaders. | |
domain |
Bytecode |
||
geometry |
Bytecode |
DeviceLimits::geometryShaders | |
pixel |
Bytecode |
entry point "main"; may be empty for depth-only pipelines | |
task |
Bytecode |
Mesh pipelines (P39, DeviceLimits::meshShaders): a mesh shader instead of vertex, and an optional task (amplification) shader before it. Drawn with cmdDrawMesh; topology is the mesh shader's. |
|
mesh |
Bytecode |
||
colorFormats |
std::vector<Format> |
||
depthFormat |
Format |
Format::eUndefined |
|
samples |
uint32 |
1 |
|
topology |
Topology |
Topology::eTriangleList |
|
patchControlPoints |
uint32 |
0 |
1..32 with Topology::ePatchList |
fill |
FillMode |
FillMode::eSolid |
|
cull |
CullMode |
CullMode::eNone |
|
frontCounterClockwise |
bool |
false |
|
depth |
DepthState |
||
depthBias |
DepthBias |
||
depthClamp |
bool |
false |
clamp depth to 0..1 instead of clipping |
stencil |
StencilState |
needs a depth format with stencil | |
blend |
std::vector<BlendState> |
One per color format, or empty: every target written as is. | |
name |
std::string_view |
empty: unnamed (P106) |
// <RI/RI.hpp>, namespace RI
struct DepthState {
bool test = false;
bool write = false;
CompareOp compare = CompareOp::eLess;
};
| Field | Type | Default | Description |
|---|---|---|---|
test |
bool |
false |
|
write |
bool |
false |
|
compare |
CompareOp |
CompareOp::eLess |
// <RI/RI.hpp>, namespace RI
enum class CompareOp : uint8 { eNever, eLess, eEqual, eLessEqual, eGreater, eNotEqual, eGreaterEqual, eAlways };
| Value | Meaning |
|---|---|
eNever |
|
eLess |
|
eEqual |
|
eLessEqual |
|
eGreater |
|
eNotEqual |
|
eGreaterEqual |
|
eAlways |
| Value | Meaning |
|---|---|
eNone |
|
eFront |
|
eBack |
// <RI/RI.hpp>, namespace RI
enum class Topology : uint8 { eTriangleList, eTriangleStrip, eLineList, eLineStrip, ePointList, ePatchList };
From the header: ePatchList: tessellation patches of GraphicsPipelineDesc::patchControlPoints control points, for pipelines with hull and domain shaders.
| Value | Meaning |
|---|---|
eTriangleList |
|
eTriangleStrip |
|
eLineList |
|
eLineStrip |
|
ePointList |
|
ePatchList |
From the header: eWireframe draws the edges of triangles as lines. Lines and points are one pixel wide on every backend.
| Value | Meaning |
|---|---|
eSolid |
|
eWireframe |
// <RI/RI.hpp>, namespace RI
struct DepthBias {
int32 constant = 0; // an integer, as D3D12 takes it
float slope = 0.0f;
float clamp = 0.0f;
};
From the header: Added to each fragment's depth before the test: constant * r + slope * (the triangle's depth slope), at most clamp in size (0: no limit), where r is the smallest depth step of the format.
| Field | Type | Default | Description |
|---|---|---|---|
constant |
int32 |
0 |
an integer, as D3D12 takes it |
slope |
float |
0.0f |
|
clamp |
float |
0.0f |
// <RI/RI.hpp>, namespace RI
struct StencilState {
bool test = false;
uint8 readMask = 0xff;
uint8 writeMask = 0xff;
uint8 reference = 0;
StencilFace front;
StencilFace back;
};
From the header: The stencil test (one read and one write mask for both faces, as D3D12 has). The reference value is part of the pipeline (P38).
| Field | Type | Default | Description |
|---|---|---|---|
test |
bool |
false |
|
readMask |
uint8 |
0xff |
|
writeMask |
uint8 |
0xff |
|
reference |
uint8 |
0 |
|
front |
StencilFace |
||
back |
StencilFace |
// <RI/RI.hpp>, namespace RI
struct StencilFace {
StencilOp fail = StencilOp::eKeep; // the stencil test fails
StencilOp depthFail = StencilOp::eKeep; // stencil passes, depth fails
StencilOp pass = StencilOp::eKeep; // both pass
CompareOp compare = CompareOp::eAlways;
};
| Field | Type | Default | Description |
|---|---|---|---|
fail |
StencilOp |
StencilOp::eKeep |
the stencil test fails |
depthFail |
StencilOp |
StencilOp::eKeep |
stencil passes, depth fails |
pass |
StencilOp |
StencilOp::eKeep |
both pass |
compare |
CompareOp |
CompareOp::eAlways |
// <RI/RI.hpp>, namespace RI
struct BlendState {
bool enable = false;
BlendFactor srcColor = BlendFactor::eOne;
BlendFactor dstColor = BlendFactor::eZero;
BlendOp colorOp = BlendOp::eAdd;
BlendFactor srcAlpha = BlendFactor::eOne;
BlendFactor dstAlpha = BlendFactor::eZero;
BlendOp alphaOp = BlendOp::eAdd;
ColorMask writeMask = ColorMask::eAll;
};
From the header: Blending of one color target: result = src * srcFactor (op) dst * dstFactor, for color and alpha separately. eMin and eMax ignore the factors.
| Field | Type | Default | Description |
|---|---|---|---|
enable |
bool |
false |
|
srcColor |
BlendFactor |
BlendFactor::eOne |
|
dstColor |
BlendFactor |
BlendFactor::eZero |
|
colorOp |
BlendOp |
BlendOp::eAdd |
|
srcAlpha |
BlendFactor |
BlendFactor::eOne |
|
dstAlpha |
BlendFactor |
BlendFactor::eZero |
|
alphaOp |
BlendOp |
BlendOp::eAdd |
|
writeMask |
ColorMask |
ColorMask::eAll |
Example¶
const std::vector<std::byte> vertexShader = loadShader("doc_triangle_vs");
const std::vector<std::byte> pixelShader = loadShader("doc_triangle_ps");
// Complete state up front (P38): shaders, attachment formats, depth state.
RI::Pipeline pipeline = RI::createGraphicsPipeline(device, {
.vertex = vertexShader,
.pixel = pixelShader,
.colorFormats = {RI::Format::eRGBA8Unorm},
.depthFormat = depthFormat,
.cull = RI::CullMode::eBack,
.depth = {.test = true, .write = true, .compare = RI::CompareOp::eLess},
});
A depth-only pipeline (a depth prepass, a shadow map):
// Depth only: no pixel shader, no color format.
RI::Pipeline depthPrepass = RI::createGraphicsPipeline(device, {
.vertex = vertexShader,
.depthFormat = depthFormat,
.depth = {.test = true, .write = true, .compare = RI::CompareOp::eLess},
});
The shaders:
#include <equine/root.hlsli>
struct DrawRoot {
float4 color; // read by the pixel shader
float depth; // the triangle's depth
};
EQ_ROOT_DATA(DrawRoot, root);
// Vertices 0, 1, 2 give (-1, 1), (3, 1), (-1, -3) in clip space: a triangle
// that covers the target. Clip-space y points up on both backends.
float4 main(uint vertex : SV_VertexID) : SV_Position {
const float2 uv = float2((vertex << 1) & 2, vertex & 2);
return float4(uv * float2(2, -2) + float2(-1, 1), root.depth, 1);
}
#include <equine/root.hlsli>
struct DrawRoot {
float4 color;
float depth;
};
EQ_ROOT_DATA(DrawRoot, root); // the same root data as the vertex shader (P44)
float4 main() : SV_Target0 { return root.color; }
The same in native code¶
const std::vector<std::byte> vertexShader = loadShader("doc_triangle_vs");
const std::vector<std::byte> pixelShader = loadShader("doc_triangle_ps");
// Complete state up front (P38): shaders, attachment formats, depth state.
RI::Pipeline pipeline = RI::createGraphicsPipeline(device, {
.vertex = vertexShader,
.pixel = pixelShader,
.colorFormats = {RI::Format::eRGBA8Unorm},
.depthFormat = depthFormat,
.cull = RI::CullMode::eBack,
.depth = {.test = true, .write = true, .compare = RI::CompareOp::eLess},
});
// The layout: push constants of the root data's size (a real renderer also
// adds its descriptor set layouts, as in snippets/vulkan/compute.cpp).
const VkPushConstantRange pushRange{.stageFlags = VK_SHADER_STAGE_ALL, .offset = 0, .size = sizeof(DrawRoot)};
const VkPipelineLayoutCreateInfo layoutInfo{.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
.pushConstantRangeCount = 1,
.pPushConstantRanges = &pushRange};
VkPipelineLayout pipelineLayout = VK_NULL_HANDLE;
check(vkCreatePipelineLayout(device, &layoutInfo, nullptr, &pipelineLayout), "vkCreatePipelineLayout");
VkShaderModule vertex = createModule(device, vertexPath);
VkShaderModule pixel = createModule(device, pixelPath);
const VkPipelineShaderStageCreateInfo stages[] = {
{.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
.stage = VK_SHADER_STAGE_VERTEX_BIT,
.module = vertex,
.pName = "main"},
{.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
.module = pixel,
.pName = "main"},
};
// Dynamic rendering: the attachment formats replace the render pass.
const VkFormat colorFormat = VK_FORMAT_R8G8B8A8_UNORM;
const VkPipelineRenderingCreateInfo renderingInfo{
.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO,
.colorAttachmentCount = 1,
.pColorAttachmentFormats = &colorFormat,
.depthAttachmentFormat = depthFormat,
.stencilAttachmentFormat = depthFormat, // the format has stencil
};
// No vertex buffers: vertices are pulled in the shader (SV_VertexID).
const VkPipelineVertexInputStateCreateInfo vertexInput{
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO};
const VkPipelineInputAssemblyStateCreateInfo inputAssembly{
.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST};
const VkPipelineViewportStateCreateInfo viewportState{
.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, .viewportCount = 1, .scissorCount = 1};
const VkPipelineRasterizationStateCreateInfo rasterization{
.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
.polygonMode = VK_POLYGON_MODE_FILL,
.cullMode = VK_CULL_MODE_BACK_BIT,
.frontFace = VK_FRONT_FACE_CLOCKWISE, // with the flipped viewport below, the same winding as D3D12
.lineWidth = 1.0f,
};
const VkPipelineMultisampleStateCreateInfo multisample{
.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT};
const VkPipelineDepthStencilStateCreateInfo depthState{
.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
.depthTestEnable = VK_TRUE,
.depthWriteEnable = VK_TRUE,
.depthCompareOp = VK_COMPARE_OP_LESS,
};
const VkPipelineColorBlendAttachmentState blendAttachment{
.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT |
VK_COLOR_COMPONENT_A_BIT};
const VkPipelineColorBlendStateCreateInfo blend{.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
.attachmentCount = 1,
.pAttachments = &blendAttachment};
// Viewport and scissor are set while recording, so one pipeline fits any size.
const VkDynamicState dynamicStates[] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR};
const VkPipelineDynamicStateCreateInfo dynamic{.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO,
.dynamicStateCount = 2,
.pDynamicStates = dynamicStates};
const VkGraphicsPipelineCreateInfo pipelineInfo{
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.pNext = &renderingInfo,
.stageCount = 2,
.pStages = stages,
.pVertexInputState = &vertexInput,
.pInputAssemblyState = &inputAssembly,
.pViewportState = &viewportState,
.pRasterizationState = &rasterization,
.pMultisampleState = &multisample,
.pDepthStencilState = &depthState,
.pColorBlendState = &blend,
.pDynamicState = &dynamic,
.layout = pipelineLayout,
};
VkPipeline pipeline = VK_NULL_HANDLE;
check(vkCreateGraphicsPipelines(device, VK_NULL_HANDLE, 1, &pipelineInfo, nullptr, &pipeline),
"vkCreateGraphicsPipelines");
vkDestroyShaderModule(device, vertex, nullptr); // not needed once the pipeline exists
vkDestroyShaderModule(device, pixel, nullptr);
What to watch for: with dynamic rendering, VkPipelineRenderingCreateInfo gives the
attachment formats instead of a render pass. Viewport and scissor are dynamic state, so
one pipeline fits any target size. The pipeline layout must match the descriptor sets
and push constants the shaders use.
// The root signature: root constants at b0, space999 (EQ_ROOT_DATA), heap indexing.
const D3D12_ROOT_PARAMETER1 rootConstants{
.ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS,
.Constants = {.ShaderRegister = 0, .RegisterSpace = 999, .Num32BitValues = sizeof(DrawRoot) / 4},
.ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL,
};
const D3D12_VERSIONED_ROOT_SIGNATURE_DESC rootDesc{
.Version = D3D_ROOT_SIGNATURE_VERSION_1_1,
.Desc_1_1 = {.NumParameters = 1,
.pParameters = &rootConstants,
.Flags = D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED |
D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED},
};
ComPtr<ID3DBlob> blob;
ComPtr<ID3DBlob> errors;
check(D3D12SerializeVersionedRootSignature(&rootDesc, &blob, &errors), "D3D12SerializeVersionedRootSignature");
ComPtr<ID3D12RootSignature> rootSignature;
check(device->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(&rootSignature)),
"CreateRootSignature");
const std::vector<char> vertex = loadDxil(vertexPath);
const std::vector<char> pixel = loadDxil(pixelPath);
D3D12_GRAPHICS_PIPELINE_STATE_DESC pso{};
pso.pRootSignature = rootSignature.Get();
pso.VS = {vertex.data(), vertex.size()};
pso.PS = {pixel.data(), pixel.size()};
pso.BlendState.RenderTarget[0] = {.BlendEnable = FALSE, // no blending: write the color as is
.LogicOpEnable = FALSE,
.SrcBlend = D3D12_BLEND_ONE,
.DestBlend = D3D12_BLEND_ZERO,
.BlendOp = D3D12_BLEND_OP_ADD,
.SrcBlendAlpha = D3D12_BLEND_ONE,
.DestBlendAlpha = D3D12_BLEND_ZERO,
.BlendOpAlpha = D3D12_BLEND_OP_ADD,
.LogicOp = D3D12_LOGIC_OP_NOOP,
.RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL};
pso.SampleMask = UINT_MAX;
pso.RasterizerState = {.FillMode = D3D12_FILL_MODE_SOLID,
.CullMode = D3D12_CULL_MODE_BACK,
.FrontCounterClockwise = FALSE,
.DepthClipEnable = TRUE};
pso.DepthStencilState.DepthEnable = TRUE;
pso.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
pso.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_LESS;
// No InputLayout: vertices are pulled in the shader (SV_VertexID).
pso.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE; // the exact topology is set when drawing
pso.NumRenderTargets = 1;
pso.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
pso.DSVFormat = DXGI_FORMAT_D32_FLOAT;
pso.SampleDesc = {.Count = 1, .Quality = 0};
ComPtr<ID3D12PipelineState> pipeline;
check(device->CreateGraphicsPipelineState(&pso, IID_PPV_ARGS(&pipeline)), "CreateGraphicsPipelineState");
What to watch for: the root signature is part of the pipeline; RI builds it from the DXIL. PrimitiveTopologyType is only the family
(triangle, line, point, patch): the exact topology, with the number of control points of
a patch, is set when drawing. Every member left at zero
must still be valid (SampleMask, the blend description).
Rules and errors¶
- Every stage that declares root data must declare the same size: a mismatch is a programmer error. A stage that declares root data but never reads it counts as declaring none (root data). Root data larger than
device.limits.maxRootDataSizeis unsupported. - More than 8
colorFormatsis a programmer error on D3D12. - Every value the pixel shader reads must be written by the stage before it (
geometry,domain,vertex, ormesh) in the same slot: pass them in one struct (values passed to the pixel shader; programmer error in validation builds). - Shader bytecode that is not valid SPIR-V on Vulkan (or DXIL on D3D12) is a programmer error.
- When
depth.writeistrueanddepth.testisfalse, RI enables the depth test withCompareOp::eAlwayson both backends so that depth is written unconditionally. - Binding a pipeline with
depth.writeset inside a read-only depth section is a programmer error in validation builds. - Provide either
vertexormesh, not both, and providetaskonly whenmeshis provided (programmer error). Creating a mesh pipeline on a GPU withoutDeviceLimits::meshShadersis unsupported. - Provide
hullanddomaintogether, withTopology::ePatchListandpatchControlPointsfrom 1 to 32; useTopology::ePatchListonly withhullanddomain; and do not passhull,domain, orgeometryin a mesh pipeline (programmer error in validation builds). Using geometry or tessellation shaders on a GPU withoutDeviceLimits::geometryShadersorDeviceLimits::tessellationis unsupported. blendmust be either empty or have one entry per element incolorFormats, and enablingstencil.testrequires adepthFormatthat includes stencil (programmer error in validation builds).- Alpha blend factors that name a color (
BlendFactor::eSrcColor,eOneMinusSrcColor,eDstColor,eOneMinusDstColor) are mapped to the matching alpha factor on D3D12, as D3D12 requires. samplesmust be supported for every attachment format (formatSupported).