Blender V4.3
mtl_drawlist.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
12#pragma once
13
14#include "BLI_sys_types.h"
15#include "GPU_batch.hh"
16#include "MEM_guardedalloc.h"
18
19#include "mtl_batch.hh"
20#include "mtl_context.hh"
21
22namespace blender::gpu {
23
27class MTLDrawList : public DrawList {
28
29 private:
31 MTLBatch *batch_;
33 void *data_;
35 size_t data_size_;
37 size_t command_offset_;
39 uint32_t command_len_;
41 uint32_t base_index_;
43 uint32_t v_first_, v_count_;
45 uint32_t buffer_size_;
46
47 public:
48 MTLDrawList(int length);
50
51 void append(Batch *batch, int i_first, int i_count) override;
52 void submit() override;
53
54 private:
55 void init();
56
57 MEM_CXX_CLASS_ALLOC_FUNCS("MTLDrawList");
58};
59
60} // namespace blender::gpu
Read Guarded memory(de)allocation.
append
struct @620::@622 batch
unsigned int uint32_t
Definition stdint.h:80