mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
ast::type: Remove Array::set_decorations
Move to constructor Bug: tint:390 Change-Id: If6c65b7305db7f9977c0cc9884a8f551e07de050 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35014 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
dec971328d
commit
8b0ffe9185
@@ -239,12 +239,11 @@ void VertexPulling::State::ConvertVertexInputVariablesToPrivate() {
|
||||
void VertexPulling::State::AddVertexStorageBuffers() {
|
||||
// TODO(idanr): Make this readonly https://github.com/gpuweb/gpuweb/issues/935
|
||||
// The array inside the struct definition
|
||||
auto internal_array = std::make_unique<ast::type::Array>(GetU32Type());
|
||||
ast::ArrayDecorationList ary_decos;
|
||||
ary_decos.push_back(mod->create<ast::StrideDecoration>(4u, Source{}));
|
||||
internal_array->set_decorations(std::move(ary_decos));
|
||||
|
||||
auto* internal_array_type = mod->unique_type(std::move(internal_array));
|
||||
auto* internal_array_type = mod->create<ast::type::Array>(
|
||||
GetU32Type(), 0,
|
||||
ast::ArrayDecorationList{
|
||||
mod->create<ast::StrideDecoration>(4u, Source{}),
|
||||
});
|
||||
|
||||
// Creating the struct type
|
||||
ast::StructMemberList members;
|
||||
|
||||
@@ -579,7 +579,7 @@ TEST_F(VertexPullingTest, TwoAttributesSameBuffer) {
|
||||
ast::type::F32 f32;
|
||||
AddVertexInputVariable(0, "var_a", &f32);
|
||||
|
||||
ast::type::Array vec4_f32{&f32, 4u};
|
||||
ast::type::Array vec4_f32{&f32, 4u, ast::ArrayDecorationList{}};
|
||||
AddVertexInputVariable(1, "var_b", &vec4_f32);
|
||||
|
||||
InitTransform(
|
||||
@@ -759,13 +759,13 @@ TEST_F(VertexPullingTest, FloatVectorAttributes) {
|
||||
InitBasicModule();
|
||||
|
||||
ast::type::F32 f32;
|
||||
ast::type::Array vec2_f32{&f32, 2u};
|
||||
ast::type::Array vec2_f32{&f32, 2u, ast::ArrayDecorationList{}};
|
||||
AddVertexInputVariable(0, "var_a", &vec2_f32);
|
||||
|
||||
ast::type::Array vec3_f32{&f32, 3u};
|
||||
ast::type::Array vec3_f32{&f32, 3u, ast::ArrayDecorationList{}};
|
||||
AddVertexInputVariable(1, "var_b", &vec3_f32);
|
||||
|
||||
ast::type::Array vec4_f32{&f32, 4u};
|
||||
ast::type::Array vec4_f32{&f32, 4u, ast::ArrayDecorationList{}};
|
||||
AddVertexInputVariable(2, "var_c", &vec4_f32);
|
||||
|
||||
InitTransform(
|
||||
|
||||
Reference in New Issue
Block a user