NXTTest: destroy the swapchain before the device

This commit is contained in:
Corentin Wallez 2018-01-19 12:53:46 -05:00 committed by Corentin Wallez
parent b91022dc23
commit 7648217f15
1 changed files with 2 additions and 2 deletions

View File

@ -21,8 +21,8 @@
#include "utils/NXTHelpers.h" #include "utils/NXTHelpers.h"
#include "utils/SystemUtils.h" #include "utils/SystemUtils.h"
#include <iostream>
#include "GLFW/glfw3.h" #include "GLFW/glfw3.h"
namespace { namespace {
utils::BackendType ParamToBackendType(BackendType type) { utils::BackendType ParamToBackendType(BackendType type) {
@ -97,8 +97,8 @@ NXTTest::~NXTTest() {
// We need to destroy child objects before the Device // We need to destroy child objects before the Device
mReadbackSlots.clear(); mReadbackSlots.clear();
queue = nxt::Queue(); queue = nxt::Queue();
device = nxt::Device();
swapchain = nxt::SwapChain(); swapchain = nxt::SwapChain();
device = nxt::Device();
delete mBinding; delete mBinding;
mBinding = nullptr; mBinding = nullptr;