Skip to content

Conversation

@Przemog1
Copy link

@Przemog1 Przemog1 commented Dec 6, 2025

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

PR description is empty, please add some valid description

// Also removed: compress, decompress, /Gch (child effect), /Gpp (partial precision)
// /Op - no support for preshaders.

def devsh_disable_hlsl_intrinsics : Flag<["-"], "devsh-disable-hlsl-intrinsics">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could call it fvk- instead of devsh- to keep with the convention

Comment on lines +28 to +38
extern std::optional<bool> disableHLSLIntrinsicsGlobalVariableBecauseIDontCare;

inline bool shouldDisableHLSLIntrinsics()
{
assert(disableHLSLIntrinsicsGlobalVariableBecauseIDontCare.has_value());

if (!disableHLSLIntrinsicsGlobalVariableBecauseIDontCare.has_value())
exit(-1);

return disableHLSLIntrinsicsGlobalVariableBecauseIDontCare.value();
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hide the global var (they mess with DLL delay loads), make the function non-inline and export like the hlsl::Check functions.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of the other SemaHLSL things seem to work via global vars!

Comment on lines +5224 to +5227
"WorldToObject",
"WorldToObject3x4",
"WorldToObject4x3"
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bunch of these are builtin input or output variables, shouldn't be allowed

StringRef nameIdentifier,
size_t argumentCount) {
// TODO: only check if the flag "devsh-disable-hlsl-intrinsics" is enabled
if (shouldDisableHLSLIntrinsics() && !checkIfIntrinsicIsAllowed(nameIdentifier))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need a standalone shouldDisableHLSLIntrinsics ? you could slap it into checkIfIntrinsicIsAllowed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants