LeviLamina
Loading...
Searching...
No Matches
EncoderImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/bgfx/RenderBind.h"
7#include "mc/external/bgfx/RenderCompute.h"
8#include "mc/external/bgfx/RenderDraw.h"
9#include "mc/external/bgfx/SortKey.h"
10#include "mc/external/bgfx/access/Enum.h"
11#include "mc/external/bgfx/texture_format/Enum.h"
12#include "mc/external/bgfx/tinystl/unordered_set.h"
13#include "mc/external/bgfx/uniform_type/Enum.h"
14
15// auto generated forward declare list
16// clang-format off
17namespace bgfx { struct Frame; }
18namespace bgfx { struct OcclusionQueryHandle; }
19namespace bgfx { struct ProgramHandle; }
20namespace bgfx { struct RangedBindings; }
21namespace bgfx { struct RayTracingConfiguration; }
22namespace bgfx { struct RayTracingResources; }
23namespace bgfx { struct ShaderBufferHandle; }
24namespace bgfx { struct TextureHandle; }
25namespace bgfx { struct TinyStlAllocator; }
26namespace bgfx { struct UniformHandle; }
27// clang-format on
28
29namespace bgfx {
30
31struct EncoderImpl {
32public:
33 // EncoderImpl inner types define
34 using HandleSet = ::tinystl::unordered_set<ushort, ::bgfx::TinyStlAllocator>;
35
36public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<8, 8, ::bgfx::Frame*> m_frame;
40 ::ll::TypedStorage<4, 16, ::bgfx::SortKey> m_key;
41 ::ll::TypedStorage<8, 128, ::bgfx::RenderDraw> m_draw;
42 ::ll::TypedStorage<4, 64, ::bgfx::RenderCompute> m_compute;
43 ::ll::TypedStorage<4, 1344, ::bgfx::RenderBind> m_bind;
44 ::ll::TypedStorage<8, 8, ::bgfx::RangedBindings*> m_rangedBindings;
45 ::ll::TypedStorage<1, 1, bool> m_isDirty;
46 ::ll::TypedStorage<4, 4, uint> m_numSubmitted;
47 ::ll::TypedStorage<4, 4, uint> m_numDropped;
48 ::ll::TypedStorage<4, 4, uint> m_uniformBegin;
49 ::ll::TypedStorage<4, 4, uint> m_uniformEnd;
50 ::ll::TypedStorage<4, 16, uint[4]> m_numVertices;
51 ::ll::TypedStorage<1, 1, uchar> m_uniformIdx;
52 ::ll::TypedStorage<1, 1, bool> m_discard;
53 ::ll::TypedStorage<8, 32, ::tinystl::unordered_set<ushort, ::bgfx::TinyStlAllocator>> m_uniformSet;
54 ::ll::TypedStorage<8, 32, ::tinystl::unordered_set<ushort, ::bgfx::TinyStlAllocator>> m_occlusionQuerySet;
55 ::ll::TypedStorage<8, 8, int64> m_cpuTimeBegin;
56 ::ll::TypedStorage<8, 8, int64> m_cpuTimeEnd;
57 // NOLINTEND
58
59public:
60 // member functions
61 // NOLINTBEGIN
62 MCAPI void clearBind();
63
64 MCAPI void discard();
65
66 MCAPI void dispatch(ushort _id, ::bgfx::ProgramHandle _handle, uint _numX, uint _numY, uint _numZ, uchar _flags);
67
68 MCAPI void doAllRayTracing(
69 ushort _id,
70 ::bgfx::RayTracingConfiguration const& rtConfig,
71 ::bgfx::RayTracingResources const& rtResources,
72 uint _width,
73 uint _height
74 );
75
76 MCAPI void setBuffersAsRanged(
77 uchar _stage,
78 ::bgfx::ShaderBufferHandle const* _shaderBufferHandles,
79 uint64 _shaderBufferHandleStride,
80 ::bgfx::Access::Enum const* _access,
81 uint64 _accessStride,
82 uint const* _bufferOffset,
83 uint64 _bufferOffsetStride,
84 uint64 _count,
85 uint _arrayIndexOffset
86 );
87
88 MCAPI void setImagesAsRanged(
89 uchar _stage,
90 ::bgfx::TextureHandle const* _textureHandles,
91 uint64 _textureHandleStride,
92 uchar const* _mips,
93 uint64 _mipsStride,
94 ::bgfx::Access::Enum const* _access,
95 uint64 _accessStride,
96 ::bgfx::TextureFormat::Enum const* _format,
97 uint64 _formatStride,
98 uint64 _count,
99 uint _offset
100 );
101
102 MCAPI void setTexturesAsRanged(
103 uchar _stage,
104 ::bgfx::TextureHandle const* _textureHandles,
105 uint64 _textureHandleStride,
106 uint const* _flags,
107 uint64 _flagStride,
108 uint64 _count,
109 uint _offset
110 );
111
112 MCAPI void
113 setUniform(::bgfx::UniformType::Enum _type, ::bgfx::UniformHandle _handle, void const* _value, ushort _num);
114
115 MCAPI void submit(
116 ushort _id,
117 ::bgfx::ProgramHandle _program,
118 ::bgfx::OcclusionQueryHandle _occlusionQuery,
119 int _depth,
120 bool _preserveState
121 );
122
123 MCAPI void updateBindHash();
124 // NOLINTEND
125};
126
127} // namespace bgfx
Definition EncoderImpl.h:7
Definition Frame.h:7
Definition OcclusionQueryHandle.h:7
Definition ProgramHandle.h:7
Definition RangedBindings.h:7
Definition RayTracingConfiguration.h:7
Definition RayTracingResources.h:7
Definition ShaderBufferHandle.h:7
Definition TextureHandle.h:7
Definition TinyStlAllocator.h:7
Definition UniformHandle.h:7