Skip to content

[SPIR-V] Errors with -fvk-invert-y and lib compilation #7446

@Nielsbishere

Description

@Nielsbishere

Description
I'm getting compile warnings when trying to invert y on a lib compilation of a vertex shader. It seems clear that it doesn't actually do what it should, when compiling this as a VS shader directly (instead of lib) it will correctly invert.
Another one that might need special caution is fvk-use-dx-position-w which might have the same problem; as I've encountered this before when compiling non PS. An important note is that lib files don't know which type of entrypoint is being compiled, it's not unlikely that non PS/VS shaders are being compiled with the same compile flags.

Steps to Reproduce
https://godbolt.org/z/sbrKbbzW8.

Actual Behavior
These two should function exactly as they do in PS (use dx position w) and VS (invert y). For user friendliness these should be possible even if VS/PS isn't available, to simplify the compile flow in case the lib doesn't actually contain any.

Environment

  • DXC version: Any
  • Host Operating System: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triagespirvWork related to SPIR-V

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions