diff options
Diffstat (limited to 'src/gpu/sequence_v2.cc')
| -rw-r--r-- | src/gpu/sequence_v2.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/sequence_v2.cc b/src/gpu/sequence_v2.cc index 9e30db0..7c44085 100644 --- a/src/gpu/sequence_v2.cc +++ b/src/gpu/sequence_v2.cc @@ -38,7 +38,7 @@ NodeRegistry::~NodeRegistry() { void NodeRegistry::declare_node(const std::string& name, NodeType type, int width, int height) { - FATAL_CHECK(nodes_.find(name) != nodes_.end(), + FATAL_CHECK(nodes_.find(name) == nodes_.end(), "Node already declared: %s\n", name.c_str()); if (width <= 0) @@ -57,9 +57,9 @@ void NodeRegistry::declare_node(const std::string& name, NodeType type, void NodeRegistry::declare_aliased_node(const std::string& name, const std::string& alias_of) { - FATAL_CHECK(nodes_.find(alias_of) == nodes_.end(), + FATAL_CHECK(nodes_.find(alias_of) != nodes_.end(), "Alias target does not exist: %s\n", alias_of.c_str()); - FATAL_CHECK(aliases_.find(name) != aliases_.end(), "Alias already exists: %s\n", + FATAL_CHECK(aliases_.find(name) == aliases_.end(), "Alias already exists: %s\n", name.c_str()); aliases_[name] = alias_of; @@ -73,7 +73,7 @@ WGPUTextureView NodeRegistry::get_view(const std::string& name) { } auto it = nodes_.find(name); - FATAL_CHECK(it == nodes_.end(), "Node not found: %s\n", name.c_str()); + FATAL_CHECK(it != nodes_.end(), "Node not found: %s\n", name.c_str()); return it->second.view; } @@ -161,7 +161,7 @@ void NodeRegistry::create_texture(Node& node) { desc.sampleCount = 1; node.texture = wgpuDeviceCreateTexture(device_, &desc); - FATAL_CHECK(node.texture == nullptr, "Failed to create texture\n"); + FATAL_CHECK(node.texture != nullptr, "Failed to create texture\n"); WGPUTextureViewDescriptor view_desc = {}; view_desc.format = format; @@ -175,7 +175,7 @@ void NodeRegistry::create_texture(Node& node) { : WGPUTextureAspect_All; node.view = wgpuTextureCreateView(node.texture, &view_desc); - FATAL_CHECK(node.view == nullptr, "Failed to create texture view\n"); + FATAL_CHECK(node.view != nullptr, "Failed to create texture view\n"); } // SequenceV2 implementation |
