summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/scripts/temp.bgfx.idl.inl
diff options
context:
space:
mode:
author Julian Sikorski <belegdol+github@gmail.com>2019-10-13 13:50:38 +0200
committer R. Belmont <rb6502@users.noreply.github.com>2019-10-13 07:50:38 -0400
commit0837e7451a84f95c29dbdb9bd6b8b931fee1635d (patch)
tree626bcbd250a7fbebdf5958a288d2f438d4f9fb5a /3rdparty/bgfx/scripts/temp.bgfx.idl.inl
parentc913ccb59d713ce0b91135520719ac5385e54358 (diff)
WIP: sync bgfx, bx and bimg with latest upstream (#5723)
* Sync with bgfx upstream revision b91d0b6 * Sync with bx upstream revision d60912b * Sync with bimg upstream revision bd81f60 * Add astc-codec decoder * Rename VertexDecl to VertexLayout * Rename UniformType enum Int1 to Sampler. * Add NVN stub * Fix unused-const-variable error on macOS * Drop redundant explicit language parameters buildoptions_cpp are only applied to c++ files and buildoptions_objcpp are only applied to objective c++ files. As such, hardcoding -x offers no benefit while preventing overrides (such as one needed by 3rdparty/bgfx/src/renderer_vk.cpp on macOS) from working. * Re-introduce -x c++ in places where C code is compiled as C++ to prevent clang from throwing a warning * Build bgfx as Objective-C++ on macOS It is needed due to included headers * Enable Direct3D12 and Vulkan bgfx rendering backends * Enable building of spirv shaders * Properly escape /c in cmd call * Comment out dx12 bgfx renderer * Honor VERBOSE setting during shaders build * Only invert hlsl shader XYZ_TO_sRGB matrix for opengl * Add spirv shaders * OpenGL ES needs transposed matrix too * Metal needs transposed matrix as well
Diffstat (limited to '3rdparty/bgfx/scripts/temp.bgfx.idl.inl')
-rw-r--r--3rdparty/bgfx/scripts/temp.bgfx.idl.inl97
1 files changed, 97 insertions, 0 deletions
diff --git a/3rdparty/bgfx/scripts/temp.bgfx.idl.inl b/3rdparty/bgfx/scripts/temp.bgfx.idl.inl
new file mode 100644
index 00000000000..63e180c2748
--- /dev/null
+++ b/3rdparty/bgfx/scripts/temp.bgfx.idl.inl
@@ -0,0 +1,97 @@
+/*
+ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
+ */
+
+/*
+ *
+ * AUTO GENERATED! DO NOT EDIT!
+ *
+ */
+
+#define BGFX_C99_ENUM_CHECK(_enum, _c99enumcount) \
+ BX_STATIC_ASSERT(_enum::Count == _enum::Enum(_c99enumcount) )
+
+BGFX_C99_ENUM_CHECK(bgfx::Fatal, BGFX_FATAL_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::RendererType, BGFX_RENDERER_TYPE_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::Attrib, BGFX_ATTRIB_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::AttribType, BGFX_ATTRIB_TYPE_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::TextureFormat, BGFX_TEXTURE_FORMAT_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::UniformType, BGFX_UNIFORM_TYPE_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::BackbufferRatio, BGFX_BACKBUFFER_RATIO_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::OcclusionQueryResult, BGFX_OCCLUSION_QUERY_RESULT_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::Topology, BGFX_TOPOLOGY_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::TopologyConvert, BGFX_TOPOLOGY_CONVERT_COUNT);
+BGFX_C99_ENUM_CHECK(bgfx::RenderFrame, BGFX_RENDER_FRAME_COUNT);
+
+#undef BGFX_C99_ENUM_CHECK
+
+#define BGFX_C99_STRUCT_SIZE_CHECK(_cppstruct, _c99struct) \
+ BX_STATIC_ASSERT(sizeof(_cppstruct) == sizeof(_c99struct) )
+
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Memory, bgfx_memory_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Transform, bgfx_transform_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Stats, bgfx_stats_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::VertexLayout, bgfx_vertex_layout_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::TransientIndexBuffer, bgfx_transient_index_buffer_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::TransientVertexBuffer, bgfx_transient_vertex_buffer_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::InstanceDataBuffer, bgfx_instance_data_buffer_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::TextureInfo, bgfx_texture_info_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::UniformInfo, bgfx_uniform_info_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Attachment, bgfx_attachment_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Caps::GPU, bgfx_caps_gpu_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Caps::Limits, bgfx_caps_limits_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::Caps, bgfx_caps_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::PlatformData, bgfx_platform_data_t);
+BGFX_C99_STRUCT_SIZE_CHECK(bgfx::InternalData, bgfx_internal_data_t);
+
+#undef BGFX_C99_STRUCT_SIZE_CHECK
+
+$c99
+
+/* user define functions */
+BGFX_C_API void bgfx_init_ctor(bgfx_init_t* _init)
+{
+ BX_PLACEMENT_NEW(_init, bgfx::Init);
+
+}
+
+BGFX_C_API bool bgfx_init(const bgfx_init_t * _init)
+{
+ bgfx_init_t init =*_init;
+
+ if (init.callback != NULL)
+ {
+ static bgfx::CallbackC99 s_callback;
+ s_callback.m_interface = init.callback;
+ init.callback = reinterpret_cast<bgfx_callback_interface_t*>(&s_callback);
+ }
+
+ if (init.allocator != NULL)
+ {
+ static bgfx::AllocatorC99 s_allocator;
+ s_allocator.m_interface = init.allocator;
+ init.allocator = reinterpret_cast<bgfx_allocator_interface_t*>(&s_allocator);
+ }
+
+ union { const bgfx_init_t* c; const bgfx::Init* cpp; } in;
+ in.c = &init;
+
+ return bgfx::init(*in.cpp);
+
+}
+
+/**/
+BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version)
+{
+ if (_version == BGFX_API_VERSION)
+ {
+ static bgfx_interface_vtbl_t s_bgfx_interface =
+ {
+ $interface_import
+ };
+
+ return &s_bgfx_interface;
+ }
+
+ return NULL;
+}