Line strips and triangle strips are drawing modes supported across 3D graphics APIs, such as OpenGL, Direct3D, and Vulkan. When using indices to control drawing, a more recent feature is "strip cutting", also called "primitive restart", whereby a special index value can be inserted to indicate that the current strip has finished, and any following indices are part of a new strip.

On OpenGL, you can enable strip cutting by calling glEnable(GL_PRIMITIVE_RESTART) and disable it by calling glDisable(GL_PRIMITIVE_RESTART). In Vulkan, you control this feature by setting the primitiveRestartEnable boolean field of the VkPipelineInputAssemblyStateCreateInfo structure. In Direct3D 12 you can use the IBStripCutValue member of the D3D12_GRAPHICS_PIPELINE_STATE_DESC structure to enable or disable strip cutting. Under Direct3D 11, this feature is on by default.

My question is, under Direct3D 11, can you turn this feature off in any way? The documentation on this is very brief, and indicates no way to disable it. Is there some magic setting lurking in the API somewhere that I've missed?

  • $\begingroup$ Is there a reason why you would need to? D3D11 picks a specific index (0xFFFF or 0xFFFFFFFF) to be the restart index. So can you not just avoid using that index in your meshes? If you have a mesh with exactly 65536 indices, just use a 32-bit index. $\endgroup$ Nov 9, 2018 at 1:23
  • $\begingroup$ @NicolBolas I'm writing an abstract rendering API which can use multiple graphics APIs in the back-end. Strip cut imposes requirements on the way the caller generates their data, and they need to be aware of it. I'd like this feature to be under the control of the caller, so they can provide their data, and say whether strip cut is used. If I can't turn this feature off in Direct3D 11, it creates an inconsistency. Since this feature didn't exist in Direct3D 10, and it can be turned off in Direct3D 12, it strikes me as odd that I can't seem to turn it off under Direct3D 11, hence the question. $\endgroup$ Nov 9, 2018 at 4:43
  • $\begingroup$ There will be very few instances where a mesh has exactly 65536 vertices. So it's not going to matter in practice. $\endgroup$ Nov 9, 2018 at 12:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.