pipeline_cache: reverse cpp/hpp contents

This commit is contained in:
Danny Robson 2017-09-08 18:10:31 +10:00
parent cfef85034f
commit efd79aa5ff
2 changed files with 33 additions and 33 deletions

View File

@ -15,20 +15,29 @@
* 2016, Danny Robson <danny@nerdcruft.net>
*/
#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<pipeline_cache,device> {
void merge (const device&,
using cruft::vk::pipeline_cache;
///////////////////////////////////////////////////////////////////////////////
void
pipeline_cache::merge (const device &dev,
const pipeline_cache *first,
const pipeline_cache *last);
size_t get (const device&, void *dst, size_t len) const;
};
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;
}

View File

@ -15,29 +15,20 @@
* 2016, Danny Robson <danny@nerdcruft.net>
*/
#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;
///////////////////////////////////////////////////////////////////////////////
void
pipeline_cache::merge (const device &dev,
namespace cruft::vk {
struct pipeline_cache : public owned<pipeline_cache,device> {
void merge (const device&,
const pipeline_cache *first,
const pipeline_cache *last)
{
auto err = vkMergePipelineCache (dev.id (), id (), last - first, &first->id ());
error::try_code (err);
const pipeline_cache *last);
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