Skip to content

Instantly share code, notes, and snippets.

@fredemmott
Created September 4, 2023 12:18
Show Gist options
  • Save fredemmott/b1cd849f093cadbe99c57a5086c8c88c to your computer and use it in GitHub Desktop.
Save fredemmott/b1cd849f093cadbe99c57a5086c8c88c to your computer and use it in GitHub Desktop.
diff --git a/gen-old/include/OXRTracing/forward_declarations.gen.hpp b/gen/include/OXRTracing/forward_declarations.gen.hpp
index 0b9a590..77b3aea 100644
--- a/gen-old/include/OXRTracing/forward_declarations.gen.hpp
+++ b/gen/include/OXRTracing/forward_declarations.gen.hpp
@@ -252,6 +252,7 @@ extern PFN_xrGetEyeGazesFB next_xrGetEyeGazesFB;
extern PFN_xrPassthroughLayerSetKeyboardHandsIntensityFB
next_xrPassthroughLayerSetKeyboardHandsIntensityFB;
extern PFN_xrGetDeviceSampleRateFB next_xrGetDeviceSampleRateFB;
+extern PFN_xrGetPassthroughPreferencesMETA next_xrGetPassthroughPreferencesMETA;
extern PFN_xrCreateVirtualKeyboardMETA next_xrCreateVirtualKeyboardMETA;
extern PFN_xrDestroyVirtualKeyboardMETA next_xrDestroyVirtualKeyboardMETA;
extern PFN_xrCreateVirtualKeyboardSpaceMETA
@@ -937,6 +938,9 @@ inline void OXRTL_DUMP_XrCompositionLayerDepthTestFB_NEXT(
inline void OXRTL_DUMP_XrLocalDimmingFrameEndInfoMETA_NEXT(
::TraceLoggingActivity<::OXRTracing::gTraceProvider>& oxrtlActivity,
const char*, const XrLocalDimmingFrameEndInfoMETA& oxrtlIt);
+inline void OXRTL_DUMP_XrPassthroughPreferencesMETA_NEXT(
+ ::TraceLoggingActivity<::OXRTracing::gTraceProvider>& oxrtlActivity,
+ const char*, const XrPassthroughPreferencesMETA& oxrtlIt);
inline void OXRTL_DUMP_XrSystemVirtualKeyboardPropertiesMETA_NEXT(
::TraceLoggingActivity<::OXRTracing::gTraceProvider>& oxrtlActivity,
const char*, const XrSystemVirtualKeyboardPropertiesMETA& oxrtlIt);
@@ -1522,6 +1526,8 @@ XrResult XRAPI_CALL OXRTracing_xrPassthroughLayerSetKeyboardHandsIntensityFB(
XrResult XRAPI_CALL OXRTracing_xrGetDeviceSampleRateFB(XrSession session,
const XrHapticActionInfo* hapticActionInfo,
XrDevicePcmSampleRateGetInfoFB* deviceSampleRate);
+XrResult XRAPI_CALL OXRTracing_xrGetPassthroughPreferencesMETA(
+ XrSession session, XrPassthroughPreferencesMETA* preferences);
XrResult XRAPI_CALL OXRTracing_xrCreateVirtualKeyboardMETA(XrSession session,
const XrVirtualKeyboardCreateInfoMETA* createInfo,
XrVirtualKeyboardMETA* keyboard);
diff --git a/gen-old/include/OXRTracing/macros.gen.hpp b/gen/include/OXRTracing/macros.gen.hpp
index 9668915..23a8884 100644
--- a/gen-old/include/OXRTracing/macros.gen.hpp
+++ b/gen/include/OXRTracing/macros.gen.hpp
@@ -35,28 +35,46 @@
///// Generated macros for platform types /////
///////////////////////////////////////////////
+#define OXRTL_ARGS_size_t(oxrtlIt, oxrtlName) \
+ TraceLoggingValue((static_cast<size_t>(oxrtlIt)), oxrtlName)
+#define OXRTL_ARGS_uint8_t(oxrtlIt, oxrtlName) \
+ TraceLoggingValue((static_cast<uint8_t>(oxrtlIt)), oxrtlName)
+#define OXRTL_ARGS_uint32_t(oxrtlIt, oxrtlName) \
+ TraceLoggingValue((static_cast<uint32_t>(oxrtlIt)), oxrtlName)
+#define OXRTL_ARGS_uint16_t(oxrtlIt, oxrtlName) \
+ TraceLoggingValue((static_cast<uint16_t>(oxrtlIt)), oxrtlName)
+#define OXRTL_ARGS_float(oxrtlIt, oxrtlName) \
+ TraceLoggingValue((static_cast<float>(oxrtlIt)), oxrtlName)
+#define OXRTL_ARGS_int32_t(oxrtlIt, oxrtlName) \
+ TraceLoggingValue((static_cast<int32_t>(oxrtlIt)), oxrtlName)
#define OXRTL_ARGS_uintptr_t(oxrtlIt, oxrtlName) \
TraceLoggingValue((static_cast<uintptr_t>(oxrtlIt)), oxrtlName)
#define OXRTL_ARGS_int16_t(oxrtlIt, oxrtlName) \
TraceLoggingValue((static_cast<int16_t>(oxrtlIt)), oxrtlName)
-#define OXRTL_ARGS_int32_t(oxrtlIt, oxrtlName) \
- TraceLoggingValue((static_cast<int32_t>(oxrtlIt)), oxrtlName)
-#define OXRTL_ARGS_uint16_t(oxrtlIt, oxrtlName) \
- TraceLoggingValue((static_cast<uint16_t>(oxrtlIt)), oxrtlName)
#define OXRTL_ARGS_uint64_t(oxrtlIt, oxrtlName) \
TraceLoggingValue((static_cast<uint64_t>(oxrtlIt)), oxrtlName)
#define OXRTL_ARGS_int8_t(oxrtlIt, oxrtlName) \
TraceLoggingValue((static_cast<int8_t>(oxrtlIt)), oxrtlName)
-#define OXRTL_ARGS_size_t(oxrtlIt, oxrtlName) \
- TraceLoggingValue((static_cast<size_t>(oxrtlIt)), oxrtlName)
-#define OXRTL_ARGS_float(oxrtlIt, oxrtlName) \
- TraceLoggingValue((static_cast<float>(oxrtlIt)), oxrtlName)
-#define OXRTL_ARGS_uint32_t(oxrtlIt, oxrtlName) \
- TraceLoggingValue((static_cast<uint32_t>(oxrtlIt)), oxrtlName)
#define OXRTL_ARGS_int64_t(oxrtlIt, oxrtlName) \
TraceLoggingValue((static_cast<int64_t>(oxrtlIt)), oxrtlName)
-#define OXRTL_ARGS_uint8_t(oxrtlIt, oxrtlName) \
- TraceLoggingValue((static_cast<uint8_t>(oxrtlIt)), oxrtlName)
+#define OXRTL_DUMP_size_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged( \
+ oxrtlActivity, oxrtlName, OXRTL_ARGS_size_t(oxrtlIt, oxrtlValueName));
+#define OXRTL_DUMP_uint8_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
+ OXRTL_ARGS_uint8_t(oxrtlIt, oxrtlValueName));
+#define OXRTL_DUMP_uint32_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
+ OXRTL_ARGS_uint32_t(oxrtlIt, oxrtlValueName));
+#define OXRTL_DUMP_uint16_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
+ OXRTL_ARGS_uint16_t(oxrtlIt, oxrtlValueName));
+#define OXRTL_DUMP_float(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged( \
+ oxrtlActivity, oxrtlName, OXRTL_ARGS_float(oxrtlIt, oxrtlValueName));
+#define OXRTL_DUMP_int32_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
+ OXRTL_ARGS_int32_t(oxrtlIt, oxrtlValueName));
#define OXRTL_DUMP_uintptr_t( \
oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
@@ -64,33 +82,15 @@
#define OXRTL_DUMP_int16_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
OXRTL_ARGS_int16_t(oxrtlIt, oxrtlValueName));
-#define OXRTL_DUMP_int32_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
- TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
- OXRTL_ARGS_int32_t(oxrtlIt, oxrtlValueName));
-#define OXRTL_DUMP_uint16_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
- TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
- OXRTL_ARGS_uint16_t(oxrtlIt, oxrtlValueName));
#define OXRTL_DUMP_uint64_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
OXRTL_ARGS_uint64_t(oxrtlIt, oxrtlValueName));
#define OXRTL_DUMP_int8_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
TraceLoggingWriteTagged( \
oxrtlActivity, oxrtlName, OXRTL_ARGS_int8_t(oxrtlIt, oxrtlValueName));
-#define OXRTL_DUMP_size_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
- TraceLoggingWriteTagged( \
- oxrtlActivity, oxrtlName, OXRTL_ARGS_size_t(oxrtlIt, oxrtlValueName));
-#define OXRTL_DUMP_float(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
- TraceLoggingWriteTagged( \
- oxrtlActivity, oxrtlName, OXRTL_ARGS_float(oxrtlIt, oxrtlValueName));
-#define OXRTL_DUMP_uint32_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
- TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
- OXRTL_ARGS_uint32_t(oxrtlIt, oxrtlValueName));
#define OXRTL_DUMP_int64_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
OXRTL_ARGS_int64_t(oxrtlIt, oxrtlValueName));
-#define OXRTL_DUMP_uint8_t(oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
- TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
- OXRTL_ARGS_uint8_t(oxrtlIt, oxrtlValueName));
//////////////////////////////////////////////////
///// Generated macros for OpenXR base types /////
@@ -224,6 +224,8 @@
OXRTL_ARGS_XrFlags64(oxrtlIt, name)
#define OXRTL_ARGS_XrCompositionLayerSettingsFlagsFB(oxrtlIt, name) \
OXRTL_ARGS_XrFlags64(oxrtlIt, name)
+#define OXRTL_ARGS_XrPassthroughPreferenceFlagsMETA(oxrtlIt, name) \
+ OXRTL_ARGS_XrFlags64(oxrtlIt, name)
#define OXRTL_ARGS_XrVirtualKeyboardInputStateFlagsMETA(oxrtlIt, name) \
OXRTL_ARGS_XrFlags64(oxrtlIt, name)
#define OXRTL_ARGS_XrExternalCameraStatusFlagsOCULUS(oxrtlIt, name) \
@@ -1110,6 +1112,8 @@ inline std::string to_string(XrStructureType value)
return "XR_TYPE_COMPOSITION_LAYER_DEPTH_TEST_FB";
case XR_TYPE_LOCAL_DIMMING_FRAME_END_INFO_META:
return "XR_TYPE_LOCAL_DIMMING_FRAME_END_INFO_META";
+ case XR_TYPE_PASSTHROUGH_PREFERENCES_META:
+ return "XR_TYPE_PASSTHROUGH_PREFERENCES_META";
case XR_TYPE_SYSTEM_VIRTUAL_KEYBOARD_PROPERTIES_META:
return "XR_TYPE_SYSTEM_VIRTUAL_KEYBOARD_PROPERTIES_META";
case XR_TYPE_VIRTUAL_KEYBOARD_CREATE_INFO_META:
@@ -8560,6 +8564,20 @@ inline std::string to_string(XrPlaneDetectionStateEXT value)
OXRTL_DUMP_XrLocalDimmingFrameEndInfoMETA_COMPLEX_FIELDS( \
oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt);
+#define OXRTL_ARGS_XrPassthroughPreferencesMETA(oxrtlIt, oxrtlName) \
+ TraceLoggingStruct(1, oxrtlName), \
+ OXRTL_ARGS_XrPassthroughPreferenceFlagsMETA((oxrtlIt.flags), "flags")
+#define OXRTL_DUMP_XrPassthroughPreferencesMETA_COMPLEX_FIELDS( \
+ oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ OXRTL_DUMP_XrPassthroughPreferencesMETA_NEXT( \
+ oxrtlActivity, oxrtlName, oxrtlIt);
+#define OXRTL_DUMP_XrPassthroughPreferencesMETA( \
+ oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt) \
+ TraceLoggingWriteTagged(oxrtlActivity, oxrtlName, \
+ OXRTL_ARGS_XrPassthroughPreferencesMETA(oxrtlIt, oxrtlValueName)); \
+ OXRTL_DUMP_XrPassthroughPreferencesMETA_COMPLEX_FIELDS( \
+ oxrtlActivity, oxrtlName, oxrtlValueName, oxrtlIt);
+
#define OXRTL_ARGS_XrSystemVirtualKeyboardPropertiesMETA(oxrtlIt, oxrtlName) \
TraceLoggingStruct(1, oxrtlName), \
OXRTL_ARGS_XrBool32( \
@@ -13792,6 +13810,22 @@ inline void OXRTL_DUMP_XrLocalDimmingFrameEndInfoMETA_NEXT(
(oxrtlNextIt_XrLocalDimmingFrameEndInfoMETA->type), "type"));
}
}
+inline void OXRTL_DUMP_XrPassthroughPreferencesMETA_NEXT(
+ ::TraceLoggingActivity<::OXRTracing::gTraceProvider>& oxrtlActivity,
+ const char*, const XrPassthroughPreferencesMETA& oxrtlIt)
+{
+ for (auto oxrtlNextIt_XrPassthroughPreferencesMETA
+ = reinterpret_cast<const XrBaseInStructure*>(oxrtlIt.next);
+ oxrtlNextIt_XrPassthroughPreferencesMETA;
+ oxrtlNextIt_XrPassthroughPreferencesMETA
+ = reinterpret_cast<const XrBaseInStructure*>(
+ oxrtlNextIt_XrPassthroughPreferencesMETA->next)) {
+ TraceLoggingWriteTagged(oxrtlActivity,
+ "XrPassthroughPreferencesMETA_next",
+ OXRTL_ARGS_XrStructureType(
+ (oxrtlNextIt_XrPassthroughPreferencesMETA->type), "type"));
+ }
+}
inline void OXRTL_DUMP_XrSystemVirtualKeyboardPropertiesMETA_NEXT(
::TraceLoggingActivity<::OXRTracing::gTraceProvider>& oxrtlActivity,
const char*, const XrSystemVirtualKeyboardPropertiesMETA& oxrtlIt)
diff --git a/gen-old/src/layer.gen.0.cpp b/gen/src/layer.gen.0.cpp
index 454d380..1a74302 100644
--- a/gen-old/src/layer.gen.0.cpp
+++ b/gen/src/layer.gen.0.cpp
@@ -291,6 +291,9 @@ PFN_xrGetEyeGazesFB next_xrGetEyeGazesFB{ nullptr };
PFN_xrPassthroughLayerSetKeyboardHandsIntensityFB
next_xrPassthroughLayerSetKeyboardHandsIntensityFB{ nullptr };
PFN_xrGetDeviceSampleRateFB next_xrGetDeviceSampleRateFB{ nullptr };
+PFN_xrGetPassthroughPreferencesMETA next_xrGetPassthroughPreferencesMETA{
+ nullptr
+};
PFN_xrCreateVirtualKeyboardMETA next_xrCreateVirtualKeyboardMETA{ nullptr };
PFN_xrDestroyVirtualKeyboardMETA next_xrDestroyVirtualKeyboardMETA{ nullptr };
PFN_xrCreateVirtualKeyboardSpaceMETA next_xrCreateVirtualKeyboardSpaceMETA{
@@ -4072,6 +4075,25 @@ XrResult XRAPI_CALL OXRTracing_xrGetDeviceSampleRateFB(XrSession session,
return ret;
}
+XrResult XRAPI_CALL OXRTracing_xrGetPassthroughPreferencesMETA(
+ XrSession session, XrPassthroughPreferencesMETA* preferences)
+{
+
+ TraceLoggingActivity<gTraceProvider> localActivity;
+ TraceLoggingWriteStart(localActivity, "xrGetPassthroughPreferencesMETA",
+ OXRTL_ARGS_XrSession(session, "session"));
+
+ const auto ret = next_xrGetPassthroughPreferencesMETA(session, preferences);
+ OXRTL_DUMP_XrPassthroughPreferencesMETA(localActivity,
+ "xrGetPassthroughPreferencesMETA", "preferences", (*preferences));
+
+ TraceLoggingWriteStop(localActivity, "xrGetPassthroughPreferencesMETA",
+ OXRTL_ARGS_XrResult(ret, "XrResult"),
+ OXRTL_ARGS_XrPassthroughPreferencesMETA((*preferences), "preferences"));
+
+ return ret;
+}
+
XrResult XRAPI_CALL OXRTracing_xrCreateVirtualKeyboardMETA(XrSession session,
const XrVirtualKeyboardCreateInfoMETA* createInfo,
XrVirtualKeyboardMETA* keyboard)
@@ -6261,6 +6283,14 @@ XrResult XRAPI_CALL OXRTracing_xrGetInstanceProcAddr(
return ret;
}
+ if (name == "xrGetPassthroughPreferencesMETA") {
+ next_xrGetPassthroughPreferencesMETA
+ = reinterpret_cast<PFN_xrGetPassthroughPreferencesMETA>(*function);
+ *function = reinterpret_cast<PFN_xrVoidFunction>(
+ &OXRTracing_xrGetPassthroughPreferencesMETA);
+ return ret;
+ }
+
if (name == "xrCreateVirtualKeyboardMETA") {
next_xrCreateVirtualKeyboardMETA
= reinterpret_cast<PFN_xrCreateVirtualKeyboardMETA>(*function);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment