mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
intrinsic_table.def: Support [[deprecated]] on fn
And produce a warning if these are used. Hard to test, as we don't want to introduce fake functions in our definition file. Also add missing cast in EnumMatcher. Bug: tint:806 Change-Id: I21f189e4befe419f6d5544acfc52387d9a5da782 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54001 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
06e2e5c2f7
commit
3e59eb0e5c
@@ -90,10 +90,12 @@ bool IsBarrierIntrinsic(IntrinsicType i) {
|
||||
Intrinsic::Intrinsic(IntrinsicType type,
|
||||
sem::Type* return_type,
|
||||
const ParameterList& parameters,
|
||||
PipelineStageSet supported_stages)
|
||||
PipelineStageSet supported_stages,
|
||||
bool is_deprecated)
|
||||
: Base(return_type, parameters),
|
||||
type_(type),
|
||||
supported_stages_(supported_stages) {}
|
||||
supported_stages_(supported_stages),
|
||||
is_deprecated_(is_deprecated) {}
|
||||
|
||||
Intrinsic::~Intrinsic() = default;
|
||||
|
||||
|
||||
@@ -78,10 +78,13 @@ class Intrinsic : public Castable<Intrinsic, CallTarget> {
|
||||
/// @param parameters the parameters for the intrinsic overload
|
||||
/// @param supported_stages the pipeline stages that this intrinsic can be
|
||||
/// used in
|
||||
/// @param is_deprecated true if the particular overload is considered
|
||||
/// deprecated
|
||||
Intrinsic(IntrinsicType type,
|
||||
sem::Type* return_type,
|
||||
const ParameterList& parameters,
|
||||
PipelineStageSet supported_stages);
|
||||
PipelineStageSet supported_stages,
|
||||
bool is_deprecated);
|
||||
|
||||
/// Destructor
|
||||
~Intrinsic() override;
|
||||
@@ -92,6 +95,9 @@ class Intrinsic : public Castable<Intrinsic, CallTarget> {
|
||||
/// @return the pipeline stages that this intrinsic can be used in
|
||||
PipelineStageSet SupportedStages() const { return supported_stages_; }
|
||||
|
||||
/// @return true if the intrinsic overload is considered deprecated
|
||||
bool IsDeprecated() const { return is_deprecated_; }
|
||||
|
||||
/// @returns the name of the intrinsic function type. The spelling, including
|
||||
/// case, matches the name in the WGSL spec.
|
||||
const char* str() const;
|
||||
@@ -126,6 +132,7 @@ class Intrinsic : public Castable<Intrinsic, CallTarget> {
|
||||
private:
|
||||
IntrinsicType const type_;
|
||||
PipelineStageSet const supported_stages_;
|
||||
bool const is_deprecated_;
|
||||
};
|
||||
|
||||
/// Emits the name of the intrinsic function type. The spelling, including case,
|
||||
|
||||
Reference in New Issue
Block a user