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

[HLSL] fmod is not restricting vector size #131024

Closed
kmpeng opened this issue Mar 12, 2025 · 0 comments · Fixed by #131035
Closed

[HLSL] fmod is not restricting vector size #131024

kmpeng opened this issue Mar 12, 2025 · 0 comments · Fixed by #131035
Assignees
Labels
HLSL HLSL Language Support

Comments

@kmpeng
Copy link
Contributor

kmpeng commented Mar 12, 2025

This is in continuation of issue #129003.

We are currently not restricting vector sizes for the fmod intrinsic.

template <int N>
_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
const inline vector<half, N> fmod(vector<half, N> X, vector<half, N> Y) {
return __detail::fmod_vec_impl(X, Y);
}
template <int N>
const inline vector<float, N> fmod(vector<float, N> X, vector<float, N> Y) {
return __detail::fmod_vec_impl(X, Y);
}

We need to exclude vec1s and limit to vec4s, similar to how PR #130724 does it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HLSL HLSL Language Support
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

3 participants