Skip to content

Always enable primitive restart for vulkan/dx12/webgpu #8755

@beicause

Description

@beicause

Is your feature request related to a problem? Please describe.
WebGPU always enables primitive restart: gpuweb/gpuweb#1002

https://www.w3.org/TR/webgpu/#dictdef-gpuprimitivestate

GPUPrimitiveStates that specify a strip primitive topology must specify a stripIndexFormat if they are used for indexed draws so that the primitive restart value that will be used is known at pipeline creation time. GPUPrimitiveStates that specify a list primitive topology will use the index format passed to setIndexBuffer() when doing indexed rendering.

But in wgpu PrimitiveState::strip_index_format can be None to disable primitive restart in vulkan and dx12.

Describe the solution you'd like
Validate PrimitiveState::strip_index_format and always enable it for vulkan and dx12 to follow WebGPU spec.

Describe alternatives you've considered
Leave it as is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: validationIssues related to validation, diagnostics, and error handlinggood first issueGood for newcomerstype: bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions