mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
Convert @group to an expression
This CL updates the group attribute to store an expression instead of a single value. The parser always produces an IntLiteralExpression at the moment. Bug: tint:1633 Change-Id: Ice05c26d652c7f5c21825f745f270e96e3d88e08 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100441 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
f9b831c39a
commit
be4c9f48aa
@@ -126,7 +126,7 @@ void InspectorBuilder::AddUniformBuffer(const std::string& name,
|
||||
const ast::Type* type,
|
||||
uint32_t group,
|
||||
uint32_t binding) {
|
||||
GlobalVar(name, type, ast::StorageClass::kUniform, Binding(AInt(binding)), Group(group));
|
||||
GlobalVar(name, type, ast::StorageClass::kUniform, Binding(AInt(binding)), Group(AInt(group)));
|
||||
}
|
||||
|
||||
void InspectorBuilder::AddWorkgroupStorage(const std::string& name, const ast::Type* type) {
|
||||
@@ -139,7 +139,7 @@ void InspectorBuilder::AddStorageBuffer(const std::string& name,
|
||||
uint32_t group,
|
||||
uint32_t binding) {
|
||||
GlobalVar(name, type, ast::StorageClass::kStorage, access, Binding(AInt(binding)),
|
||||
Group(group));
|
||||
Group(AInt(group)));
|
||||
}
|
||||
|
||||
void InspectorBuilder::MakeStructVariableReferenceBodyFunction(
|
||||
@@ -171,20 +171,20 @@ void InspectorBuilder::MakeStructVariableReferenceBodyFunction(
|
||||
}
|
||||
|
||||
void InspectorBuilder::AddSampler(const std::string& name, uint32_t group, uint32_t binding) {
|
||||
GlobalVar(name, sampler_type(), Binding(AInt(binding)), Group(group));
|
||||
GlobalVar(name, sampler_type(), Binding(AInt(binding)), Group(AInt(group)));
|
||||
}
|
||||
|
||||
void InspectorBuilder::AddComparisonSampler(const std::string& name,
|
||||
uint32_t group,
|
||||
uint32_t binding) {
|
||||
GlobalVar(name, comparison_sampler_type(), Binding(AInt(binding)), Group(group));
|
||||
GlobalVar(name, comparison_sampler_type(), Binding(AInt(binding)), Group(AInt(group)));
|
||||
}
|
||||
|
||||
void InspectorBuilder::AddResource(const std::string& name,
|
||||
const ast::Type* type,
|
||||
uint32_t group,
|
||||
uint32_t binding) {
|
||||
GlobalVar(name, type, Binding(AInt(binding)), Group(group));
|
||||
GlobalVar(name, type, Binding(AInt(binding)), Group(AInt(group)));
|
||||
}
|
||||
|
||||
void InspectorBuilder::AddGlobalVariable(const std::string& name, const ast::Type* type) {
|
||||
@@ -286,7 +286,7 @@ void InspectorBuilder::AddStorageTexture(const std::string& name,
|
||||
const ast::Type* type,
|
||||
uint32_t group,
|
||||
uint32_t binding) {
|
||||
GlobalVar(name, type, Binding(AInt(binding)), Group(group));
|
||||
GlobalVar(name, type, Binding(AInt(binding)), Group(AInt(group)));
|
||||
}
|
||||
|
||||
const ast::Function* InspectorBuilder::MakeStorageTextureBodyFunction(
|
||||
|
||||
Reference in New Issue
Block a user