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