summaryrefslogtreecommitdiff
path: root/tools/cnn_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cnn_test.cc')
-rw-r--r--tools/cnn_test.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/cnn_test.cc b/tools/cnn_test.cc
index 4ce9637..fa4394f 100644
--- a/tools/cnn_test.cc
+++ b/tools/cnn_test.cc
@@ -281,6 +281,7 @@ int main(int argc, char** argv) {
WGPUTexture input_texture =
load_texture(device, queue, args.input_path, &width, &height);
if (!input_texture) {
+ SamplerCache::Get().clear();
fixture.shutdown();
return 1;
}
@@ -311,6 +312,7 @@ int main(int argc, char** argv) {
if (pipeline_final) wgpuRenderPipelineRelease(pipeline_final);
wgpuTextureViewRelease(input_view);
wgpuTextureRelease(input_texture);
+ SamplerCache::Get().clear();
fixture.shutdown();
return 1;
}
@@ -448,6 +450,7 @@ int main(int argc, char** argv) {
wgpuBindGroupLayoutRelease(bgl);
wgpuRenderPipelineRelease(pipeline_final);
wgpuRenderPipelineRelease(pipeline_intermediate);
+ SamplerCache::Get().clear();
fixture.shutdown();
return 1;
}
@@ -474,6 +477,7 @@ int main(int argc, char** argv) {
wgpuBindGroupLayoutRelease(bgl);
wgpuRenderPipelineRelease(pipeline_final);
wgpuRenderPipelineRelease(pipeline_intermediate);
+ SamplerCache::Get().clear();
fixture.shutdown();
return 1;
}
@@ -540,6 +544,7 @@ int main(int argc, char** argv) {
wgpuRenderPipelineRelease(pipeline_final);
wgpuTextureViewRelease(input_view);
wgpuTextureRelease(input_texture);
+ SamplerCache::Get().clear();
fixture.shutdown();
return 0;