tgjones/HlslTools

Pragma once is ignored

Nielsbishere opened this issue · 2 comments

#pragma once should allow duplicate includes to be ignored. Currently it'll think the same symbols are defined multiple times if one of the includes includes the same include as a different include. The error is about ambiguous symbols.

This would be great, especially because Unreal's shaders use #pragma once everywhere, and HLSL tools is now included in the latest Visual Studio previews along with improved Unreal support. I think this also causes a lot of slowdowns as it means the same files are processed many times.

I agree, this would be a nice feature to add. PRs gratefully accepted 😄