diff --git a/device_memory.cpp b/device_memory.cpp index 26dd871..7d18d87 100644 --- a/device_memory.cpp +++ b/device_memory.cpp @@ -39,7 +39,7 @@ cruft::vk::map_t::destroy (device &_device, device_memory &_memory) vkUnmapMemory (_device.native (), _memory.native ()); - *this = {nullptr, nullptr}; + *this = nullptr; } diff --git a/pipeline_cache.cpp b/pipeline_cache.cpp index d4f0c6b..469931a 100644 --- a/pipeline_cache.cpp +++ b/pipeline_cache.cpp @@ -19,6 +19,8 @@ #include "./device.hpp" +#include + using cruft::vk::pipeline_cache; @@ -28,7 +30,8 @@ pipeline_cache::merge (const device &dev, const pipeline_cache *first, const pipeline_cache *last) { - auto err = vkMergePipelineCaches (dev.native (), native (), last - first, &first->native ()); + CHECK_GE (last, first); + auto err = vkMergePipelineCaches (dev.native (), native (), trunc_cast (last - first), &first->native ()); error::try_code (err); }