Skip to content

[HLSL] fmod is not restricting vector size #131024

@kmpeng

Description

@kmpeng

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.

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Support

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions