Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vk_storage_buffer.hh « vulkan « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a51f89f627aad0ba9651121f74fe9e3207210470 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2022 Blender Foundation. All rights reserved. */

/** \file
 * \ingroup gpu
 */

#pragma once

#include "GPU_texture.h"

#include "gpu_storage_buffer_private.hh"

namespace blender::gpu {

class VKStorageBuffer : public StorageBuf {
 public:
  VKStorageBuffer(int size, const char *name) : StorageBuf(size, name)
  {
  }

  void update(const void *data) override;
  void bind(int slot) override;
  void unbind() override;
  void clear(eGPUTextureFormat internal_format, eGPUDataFormat data_format, void *data) override;
  void copy_sub(VertBuf *src, uint dst_offset, uint src_offset, uint copy_size) override;
  void read(void *data) override;
};

}  // namespace blender::gpu