Skip to content

Add binding hints to shader reflection for unsupported scenarios. #167

@crud89

Description

@crud89

Describe your problem

Currently shader reflection is limited in both backends. Most notably:

❎ DirectX 12

  • It is not possible to declare push constants or static samplers using shader reflection only. Instead, a root signature must be defined in the shader.
  • A special static property is set to suppress a warning emitted in this regard, which is a global switch that should be removed.

🌋 Vulkan

  • Unbounded arrays do (naturally) not expose the maximum descriptor count. It is hardly possible to find a good guess for those, especially if the descriptor set layout should be re-used.

Describe your proposed solution

Shader reflection should receive an optional collection of binding hints, where the above properties could be set before invoking reflection. Reflection then prioritizes the hint settings above the automatically deduced properties for the respective descriptor layouts.

Metadata

Metadata

Assignees

Labels

DX12 ❎The issue involves the DX12 backend.FeatureNew feature or request.Vulkan 🌋The issue involves the Vulkan backend.

Projects

Status

v0.5.1

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions