mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Remove the context object.
This CL strips the context object out of Tint. Change-Id: Id0dcb9c557b217c03a8d9ac08fc9fe1c799f3fdc Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34742 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
bd018d254d
commit
c35176eadf
@@ -12,9 +12,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/ast/case_statement.h"
|
||||
#include <unordered_set>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "src/ast/case_statement.h"
|
||||
#include "src/reader/wgsl/parser.h"
|
||||
#include "src/writer/wgsl/generator.h"
|
||||
|
||||
@@ -107,8 +108,7 @@ fn main() -> void {
|
||||
)");
|
||||
|
||||
// Parse the wgsl, create the src module
|
||||
Context ctx;
|
||||
reader::wgsl::Parser parser(&ctx, &file);
|
||||
reader::wgsl::Parser parser(&file);
|
||||
ASSERT_TRUE(parser.Parse()) << parser.error();
|
||||
auto src = parser.module();
|
||||
|
||||
|
||||
@@ -92,12 +92,11 @@ TEST_F(StorageTextureTest, TypeName) {
|
||||
}
|
||||
|
||||
TEST_F(StorageTextureTest, F32) {
|
||||
Context ctx;
|
||||
Module mod;
|
||||
Type* s = mod.create<StorageTexture>(TextureDimension::k2dArray,
|
||||
ast::AccessControl::kReadOnly,
|
||||
ImageFormat::kRgba32Float);
|
||||
TypeDeterminer td(&ctx, &mod);
|
||||
TypeDeterminer td(&mod);
|
||||
|
||||
ASSERT_TRUE(td.Determine()) << td.error();
|
||||
ASSERT_TRUE(s->Is<Texture>());
|
||||
@@ -106,12 +105,11 @@ TEST_F(StorageTextureTest, F32) {
|
||||
}
|
||||
|
||||
TEST_F(StorageTextureTest, U32) {
|
||||
Context ctx;
|
||||
Module mod;
|
||||
Type* s = mod.create<StorageTexture>(TextureDimension::k2dArray,
|
||||
ast::AccessControl::kReadOnly,
|
||||
ImageFormat::kRg32Uint);
|
||||
TypeDeterminer td(&ctx, &mod);
|
||||
TypeDeterminer td(&mod);
|
||||
|
||||
ASSERT_TRUE(td.Determine()) << td.error();
|
||||
ASSERT_TRUE(s->Is<Texture>());
|
||||
@@ -120,12 +118,11 @@ TEST_F(StorageTextureTest, U32) {
|
||||
}
|
||||
|
||||
TEST_F(StorageTextureTest, I32) {
|
||||
Context ctx;
|
||||
Module mod;
|
||||
Type* s = mod.create<StorageTexture>(TextureDimension::k2dArray,
|
||||
ast::AccessControl::kReadOnly,
|
||||
ImageFormat::kRgba32Sint);
|
||||
TypeDeterminer td(&ctx, &mod);
|
||||
TypeDeterminer td(&mod);
|
||||
|
||||
ASSERT_TRUE(td.Determine()) << td.error();
|
||||
ASSERT_TRUE(s->Is<Texture>());
|
||||
|
||||
Reference in New Issue
Block a user