Nathan =?utf-8?q?Gauër?= <[email protected]>,
Nathan =?utf-8?q?Gauër?= <[email protected]>,
Nathan =?utf-8?q?Gauër?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -240,6 +241,8 @@ class SemaHLSL : public SemaBase {
     HLSLParsedSemanticAttr *Semantic;
     std::optional<uint32_t> Index;
   };
+  std::optional<bool> InputUsesExplicitVkLocations = std::nullopt;
+  std::optional<bool> OutputUsesExplicitVkLocations = std::nullopt;
----------------
s-perron wrote:

In general, I'm not a fan of state variable like this. This variable does not 
represent the state of SemaHLSL, it is the state of a particular 
function/algorithm. It is unclear when it should be reset. Do we want the use 
of a vk::location in one shader to force the use in another shader in the 
library? DXC does not do that currently: https://godbolt.org/z/1z5dYxcG8.

I'm wondering if it would be more readable to place many of the parameters to 
determineActiveSemantic into a new struct or class. Then that can be passed 
around as a group. These could be stored there instead.

Does that seem reasonable?

https://github.com/llvm/llvm-project/pull/169479
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to