Skip to content

Consider other polyfills for builtins on D3D12 #8348

@cwfitzgerald

Description

@cwfitzgerald

Stemmed from #8332.

We currently need to use root constants to push 3 different values to d3d12.

  • @builtin(base_vertex) needed for @builtin(vertex_index)
  • @builtin(base_instance) needed for @builtin(instance_index)
  • @builtin(num_workgroups)

All of these could be managed if we can somehow bind the indirect buffer to the shader so that the shader can read directly from its indirect buffer instead of using root constants and the shader polyfill. This would likely require us have multiple internal pipelines, one for direct and one for indirect. Thankfully switching between the two likely isn't amazingly common so this is probably a reasonable tradeoff. We also don't need to go through translating the shader multiple times, which is a real problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions