mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
ProgramBuilder: Remove storage parameter from [Global]Const()
Storage classes are unused for constants. Also trim extra arguments to these variable constructor functions that are already defaulted to the same value. Change-Id: Ia0b44364de000bfb8799de15827ce08fcce5f5be Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41541 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
37571bc32d
commit
81a29fe555
@@ -175,7 +175,7 @@ class InspectorHelper : public ProgramBuilder {
|
||||
constructor =
|
||||
create<ast::ScalarConstructorExpression>(MakeLiteral(type, val));
|
||||
}
|
||||
GlobalConst(name, type, ast::StorageClass::kNone, constructor,
|
||||
GlobalConst(name, type, constructor,
|
||||
ast::VariableDecorationList{
|
||||
create<ast::ConstantIdDecoration>(id),
|
||||
});
|
||||
@@ -319,11 +319,11 @@ class InspectorHelper : public ProgramBuilder {
|
||||
ast::StorageClass storage_class,
|
||||
uint32_t group,
|
||||
uint32_t binding) {
|
||||
GlobalConst(name, type, storage_class, nullptr,
|
||||
ast::VariableDecorationList{
|
||||
create<ast::BindingDecoration>(binding),
|
||||
create<ast::GroupDecoration>(group),
|
||||
});
|
||||
Global(name, type, storage_class, nullptr,
|
||||
ast::VariableDecorationList{
|
||||
create<ast::BindingDecoration>(binding),
|
||||
create<ast::GroupDecoration>(group),
|
||||
});
|
||||
}
|
||||
|
||||
/// Adds an uniform buffer variable to the program
|
||||
|
||||
Reference in New Issue
Block a user