mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
writer/msl: Handle texture and sampler variables
Move these module-scope variables to entry point parameters and pass them as arguments to functions that use them. Disable entry point IO validation for them. Emit [[texture()]] and [[sampler()]] attributes on these entry point parameters. Fixed: tint:145 Change-Id: I936a80801875a5d0b6cd98a2e8f3e297a2f53509 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53961 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
2940c7002c
commit
830b97ffa9
@@ -36,6 +36,8 @@ std::string DisableValidationDecoration::InternalName() const {
|
||||
return "disable_validation__binding_point_collision";
|
||||
case DisabledValidation::kFunctionVarStorageClass:
|
||||
return "disable_validation__function_var_storage_class";
|
||||
case DisabledValidation::kEntryPointParameter:
|
||||
return "disable_validation__entry_point_parameter";
|
||||
}
|
||||
return "<invalid>";
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ enum class DisabledValidation {
|
||||
/// When applied to a function-scoped variable, the validator will not
|
||||
/// complain if the storage class is not `function`.
|
||||
kFunctionVarStorageClass,
|
||||
/// When applied to an entry-point function parameter, the validator will not
|
||||
/// check for entry IO decorations.
|
||||
kEntryPointParameter,
|
||||
};
|
||||
|
||||
/// An internal decoration used to tell the validator to ignore specific
|
||||
|
||||
Reference in New Issue
Block a user