From efd79aa5ff41ca12f7b36f1a88608389794c4b0d Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 8 Sep 2017 18:10:31 +1000 Subject: [PATCH] pipeline_cache: reverse cpp/hpp contents --- pipeline_cache.cpp | 33 +++++++++++++++++++++------------ pipeline_cache.hpp | 33 ++++++++++++--------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/pipeline_cache.cpp b/pipeline_cache.cpp index 1f0663d..60b500d 100644 --- a/pipeline_cache.cpp +++ b/pipeline_cache.cpp @@ -15,20 +15,29 @@ * 2016, Danny Robson */ -#ifndef __VK_PIPELINE_CACHE_HPP -#define __VK_PIPELINE_CACHE_HPP +#include "./pipeline_cache.hpp" -#include "./object.hpp" -#include "./fwd.hpp" +#include "./device.hpp" -namespace cruft::vk { - struct pipeline_cache : public owned { - void merge (const device&, - const pipeline_cache *first, - const pipeline_cache *last); +using cruft::vk::pipeline_cache; - size_t get (const device&, void *dst, size_t len) const; - }; + +/////////////////////////////////////////////////////////////////////////////// +void +pipeline_cache::merge (const device &dev, + const pipeline_cache *first, + const pipeline_cache *last) +{ + auto err = vkMergePipelineCaches (dev.native (), native (), last - first, &first->native ()); + error::try_code (err); } -#endif + +/////////////////////////////////////////////////////////////////////////////// +size_t +pipeline_cache::get (const device &dev, void *dst, size_t len) const +{ + auto err = vkGetPipelineCacheData (dev.native (), native (), &len, dst); + error::try_code (err); + return len; +} diff --git a/pipeline_cache.hpp b/pipeline_cache.hpp index f309c30..1f0663d 100644 --- a/pipeline_cache.hpp +++ b/pipeline_cache.hpp @@ -15,29 +15,20 @@ * 2016, Danny Robson */ -#include "./pipeline_cache.hpp" +#ifndef __VK_PIPELINE_CACHE_HPP +#define __VK_PIPELINE_CACHE_HPP -#include "./device.hpp" +#include "./object.hpp" +#include "./fwd.hpp" -using cruft::vk::pipeline_cache; +namespace cruft::vk { + struct pipeline_cache : public owned { + void merge (const device&, + const pipeline_cache *first, + const pipeline_cache *last); - -/////////////////////////////////////////////////////////////////////////////// -void -pipeline_cache::merge (const device &dev, - const pipeline_cache *first, - const pipeline_cache *last) -{ - auto err = vkMergePipelineCache (dev.id (), id (), last - first, &first->id ()); - error::try_code (err); + size_t get (const device&, void *dst, size_t len) const; + }; } - -/////////////////////////////////////////////////////////////////////////////// -size_t -pipeline_cache::get (const device &dev, void *dst, size_t len) -{ - auto err = vkGetPipelineCacheData (dev.id (), id (), dst, &len); - error::try_code (err); - return len; -} +#endif