Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

[hlsl-out] Don't output interpolation modifier if it's the default #1809

Merged
merged 2 commits into from
Apr 10, 2022

Conversation

NoelTautges
Copy link
Contributor

Currently, hlsl-out writes the interpolation modifier before most structs, e.g.

struct input_0_ {
    linear float4 SV_Position : LOC0;
};

However, the linear intepolation modifier is the default in HLSL.

This pull request makes hlsl-output not output linear to make outputted code look more human-like.

@NoelTautges
Copy link
Contributor Author

I forgot to test with --all-features. Let me change the output tests. 😅

@NoelTautges NoelTautges marked this pull request as draft April 8, 2022 21:43
@NoelTautges
Copy link
Contributor Author

I ran the changed tests through FXC and the output was the same.

@NoelTautges NoelTautges marked this pull request as ready for review April 8, 2022 22:13
@kvark kvark merged commit a3d968e into gfx-rs:master Apr 10, 2022
@NoelTautges NoelTautges deleted the hlsl-linear-default branch April 10, 2022 05:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants