Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unconsumed inputs in fragment shaders #5531

Merged
merged 2 commits into from
Jul 4, 2024

Commits on Jul 4, 2024

  1. Allow unconsumed inputs in fragment shaders by removing them from vertex

    outputs when generating HLSL.
    
    Fixes gfx-rs#3748
    
    * Add naga::back::hlsl::FragmentEntryPoint for providing information
      about the fragment entry point when generating vertex entry points via
      naga::back::hlsl::Writer::write. Vertex outputs not consumed by the
      fragment entry point are omitted in the final output struct.
    * Add naga snapshot test for this new feature,
    * Remove Features::SHADER_UNUSED_VERTEX_OUTPUT,
      StageError::InputNotConsumed, and associated validation logic.
    * Make wgpu dx12 backend pass fragment shader info when generating
      vertex HLSL.
    * Add wgpu regression test for allowing unconsumed inputs.
    Imberflur committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    ae7514f View commit details
    Browse the repository at this point in the history
  2. Address review

    * Add note that nesting structs for the inter-stage interface can't
      happen.
    * Remove new TODO notes (some addressed and some transferred to an issue
      gfx-rs#5577)
    * Changed issue that regression test refers to 3748 -> 5553
    * Add debug_assert that binding.is_some() in hlsl writer
    * Fix typos caught in CI
    
    Also, fix compiling snapshot test when hlsl-out feature is not enabled.
    Imberflur committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    2acc943 View commit details
    Browse the repository at this point in the history