Skip to content

Commit

Permalink
- Sort tables by vendor, then alphabetically.
Browse files Browse the repository at this point in the history
  • Loading branch information
maluoi committed Mar 10, 2022
1 parent 13c1f42 commit e9f109a
Showing 1 changed file with 113 additions and 113 deletions.
226 changes: 113 additions & 113 deletions src/openxrexplorer/openxr_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,30 +411,6 @@ xr_properties_t openxr_load_properties() {
table.cols[0].add({"graphics.maxSwapchainImageHeight"}); table.cols[1].add({new_string("%u", result.system.graphicsProperties.maxSwapchainImageHeight)});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemHandTrackingPropertiesEXT";
table.spec = "XrSystemHandTrackingPropertiesEXT";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsHandTracking"}); table.cols[1].add({result.hand_tracking.supportsHandTracking ? "True":"False"});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemHandTrackingMeshPropertiesMSFT";
table.spec = "XrSystemHandTrackingMeshPropertiesMSFT";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsHandTrackingMesh"}); table.cols[1].add({result.hand_mesh.supportsHandTrackingMesh ? "True":"False"});
table.cols[0].add({"maxHandMeshIndexCount" }); table.cols[1].add({new_string("%u", result.hand_mesh.maxHandMeshIndexCount)});
table.cols[0].add({"maxHandMeshVertexCount" }); table.cols[1].add({new_string("%u", result.hand_mesh.maxHandMeshVertexCount)});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemEyeGazeInteractionPropertiesEXT";
Expand All @@ -448,13 +424,13 @@ xr_properties_t openxr_load_properties() {

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemFoveatedRenderingPropertiesVARJO";
table.spec = "XrSystemFoveatedRenderingPropertiesVARJO";
table.name_type = "XrSystemHandTrackingPropertiesEXT";
table.spec = "XrSystemHandTrackingPropertiesEXT";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsFoveatedRendering"}); table.cols[1].add({result.foveated_varjo.supportsFoveatedRendering ? "True":"False"});
table.cols[0].add({"supportsHandTracking"}); table.cols[1].add({result.hand_tracking.supportsHandTracking ? "True":"False"});
xr_tables.add(table);

table = {};
Expand All @@ -476,70 +452,94 @@ xr_properties_t openxr_load_properties() {

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemFacialTrackingPropertiesHTC";
table.spec = "XrSystemFacialTrackingPropertiesHTC";
table.name_type = "XrSystemKeyboardTrackingPropertiesFB";
table.spec = "XrSystemKeyboardTrackingPropertiesFB";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportEyeFacialTracking"}); table.cols[1].add({result.facial_tracking_htc.supportEyeFacialTracking ? "True":"False"});
table.cols[0].add({"supportLipFacialTracking"}); table.cols[1].add({result.facial_tracking_htc.supportLipFacialTracking ? "True":"False"});
table.cols[0].add({"supportsKeyboardTracking"}); table.cols[1].add({result.keyboard_tracking_fb.supportsKeyboardTracking ? "True":"False"});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemKeyboardTrackingPropertiesFB";
table.spec = "XrSystemKeyboardTrackingPropertiesFB";
table.name_type = "XrSystemPassthroughPropertiesFB";
table.spec = "XrSystemPassthroughPropertiesFB";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsKeyboardTracking"}); table.cols[1].add({result.keyboard_tracking_fb.supportsKeyboardTracking ? "True":"False"});
table.cols[0].add({"supportsPassthrough"}); table.cols[1].add({result.passthrough_fb.supportsPassthrough ? "True":"False"});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemMarkerTrackingPropertiesVARJO";
table.spec = "XrSystemMarkerTrackingPropertiesVARJO";
table.name_type = "XrSystemRenderModelPropertiesFB";
table.spec = "XrSystemRenderModelPropertiesFB";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsMarkerTracking"}); table.cols[1].add({result.marker_tracking_varjo.supportsMarkerTracking ? "True":"False"});
table.cols[0].add({"supportsRenderModelLoading"}); table.cols[1].add({result.render_model_fb.supportsRenderModelLoading ? "True":"False"});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemPassthroughPropertiesFB";
table.spec = "XrSystemPassthroughPropertiesFB";
table.name_type = "XrSystemSpaceWarpPropertiesFB";
table.spec = "XrSystemSpaceWarpPropertiesFB";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsPassthrough"}); table.cols[1].add({result.passthrough_fb.supportsPassthrough ? "True":"False"});
table.cols[0].add({"recommendedMotionVectorImageRectHeight"}); table.cols[1].add({ new_string("%u", result.space_warp_fb.recommendedMotionVectorImageRectHeight) });
table.cols[0].add({"recommendedMotionVectorImageRectWidth" }); table.cols[1].add({ new_string("%u", result.space_warp_fb.recommendedMotionVectorImageRectWidth ) });
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemRenderModelPropertiesFB";
table.spec = "XrSystemRenderModelPropertiesFB";
table.name_type = "XrSystemFacialTrackingPropertiesHTC";
table.spec = "XrSystemFacialTrackingPropertiesHTC";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsRenderModelLoading"}); table.cols[1].add({result.render_model_fb.supportsRenderModelLoading ? "True":"False"});
table.cols[0].add({"supportEyeFacialTracking"}); table.cols[1].add({result.facial_tracking_htc.supportEyeFacialTracking ? "True":"False"});
table.cols[0].add({"supportLipFacialTracking"}); table.cols[1].add({result.facial_tracking_htc.supportLipFacialTracking ? "True":"False"});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemHandTrackingMeshPropertiesMSFT";
table.spec = "XrSystemHandTrackingMeshPropertiesMSFT";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsHandTrackingMesh"}); table.cols[1].add({result.hand_mesh.supportsHandTrackingMesh ? "True":"False"});
table.cols[0].add({"maxHandMeshIndexCount" }); table.cols[1].add({new_string("%u", result.hand_mesh.maxHandMeshIndexCount)});
table.cols[0].add({"maxHandMeshVertexCount" }); table.cols[1].add({new_string("%u", result.hand_mesh.maxHandMeshVertexCount)});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemFoveatedRenderingPropertiesVARJO";
table.spec = "XrSystemFoveatedRenderingPropertiesVARJO";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"supportsFoveatedRendering"}); table.cols[1].add({result.foveated_varjo.supportsFoveatedRendering ? "True":"False"});
xr_tables.add(table);

table = {};
table.name_func = "xrGetSystemProperties";
table.name_type = "XrSystemSpaceWarpPropertiesFB";
table.spec = "XrSystemSpaceWarpPropertiesFB";
table.name_type = "XrSystemMarkerTrackingPropertiesVARJO";
table.spec = "XrSystemMarkerTrackingPropertiesVARJO";
table.error = properties_err;
table.tag = display_tag_properties;
table.show_type = true;
table.column_count = 2;
table.cols[0].add({"recommendedMotionVectorImageRectHeight"}); table.cols[1].add({ new_string("%u", result.space_warp_fb.recommendedMotionVectorImageRectHeight) });
table.cols[0].add({"recommendedMotionVectorImageRectWidth" }); table.cols[1].add({ new_string("%u", result.space_warp_fb.recommendedMotionVectorImageRectWidth ) });
table.cols[0].add({"supportsMarkerTracking"}); table.cols[1].add({result.marker_tracking_varjo.supportsMarkerTracking ? "True":"False"});
xr_tables.add(table);

return result;
Expand Down Expand Up @@ -779,60 +779,6 @@ void openxr_register_enums() {
};
xr_misc_enums.add(info);

info = { "xrEnumerateReprojectionModesMSFT" };
info.source_type_name = "XrReprojectionModeMSFT";
info.spec_link = "XrReprojectionModeMSFT";
info.requires_session = false;
info.tag = display_tag_misc;
info.load_info = [](xr_enum_info_t *ref_info, xr_settings_t settings) {
PFN_xrEnumerateReprojectionModesMSFT xrEnumerateReprojectionModesMSFT;
XrResult error = xrGetInstanceProcAddr(xr_instance, "xrEnumerateReprojectionModesMSFT", (PFN_xrVoidFunction *)(&xrEnumerateReprojectionModesMSFT));
if (XR_FAILED(error)) return error;

uint32_t count = 0;
error = xrEnumerateReprojectionModesMSFT(xr_instance, xr_system_id, xr_view.current_config, 0, &count, nullptr);
array_t<XrReprojectionModeMSFT> reprojection_modes(count, (XrReprojectionModeMSFT)0);
xrEnumerateReprojectionModesMSFT(xr_instance, xr_system_id, xr_view.current_config, count, &count, reprojection_modes.data);

for (size_t i = 0; i < reprojection_modes.count; i++) {
switch (reprojection_modes[i]) {
#define CASE_GET_NAME(e, val) case e: ref_info->items.add({ #e }); break;
XR_LIST_ENUM_XrReprojectionModeMSFT(CASE_GET_NAME)
#undef CASE_GET_NAME
}
}
reprojection_modes.free();
return error;
};
xr_misc_enums.add(info);

info = { "xrEnumerateSceneComputeFeaturesMSFT" };
info.source_type_name = "XrSceneComputeFeatureMSFT";
info.spec_link = "XrSceneComputeFeatureMSFT";
info.requires_session = false;
info.tag = display_tag_misc;
info.load_info = [](xr_enum_info_t *ref_info, xr_settings_t settings) {
PFN_xrEnumerateSceneComputeFeaturesMSFT xrEnumerateSceneComputeFeaturesMSFT;
XrResult error = xrGetInstanceProcAddr(xr_instance, "xrEnumerateSceneComputeFeaturesMSFT", (PFN_xrVoidFunction *)(&xrEnumerateSceneComputeFeaturesMSFT));
if (XR_FAILED(error)) return error;

uint32_t count = 0;
error = xrEnumerateSceneComputeFeaturesMSFT(xr_instance, xr_system_id, 0, &count, nullptr);
array_t<XrSceneComputeFeatureMSFT> compute_features(count, (XrSceneComputeFeatureMSFT)0);
xrEnumerateSceneComputeFeaturesMSFT(xr_instance, xr_system_id, count, &count, compute_features.data);

for (size_t i = 0; i < compute_features.count; i++) {
switch (compute_features[i]) {
#define CASE_GET_NAME(e, val) case e: ref_info->items.add({ #e }); break;
XR_LIST_ENUM_XrSceneComputeFeatureMSFT(CASE_GET_NAME)
#undef CASE_GET_NAME
}
}
compute_features.free();
return error;
};
xr_misc_enums.add(info);

info = { "xrEnumerateDisplayRefreshRatesFB" };
info.source_type_name = "float";
info.spec_link = "xrEnumerateDisplayRefreshRatesFB";
Expand All @@ -856,6 +802,29 @@ void openxr_register_enums() {
};
xr_misc_enums.add(info);

info = { "xrEnumerateRenderModelPathsFB" };
info.source_type_name = "XrRenderModelPathInfoFB";
info.spec_link = "XrRenderModelPathInfoFB";
info.requires_session = true;
info.tag = display_tag_misc;
info.load_info = [](xr_enum_info_t *ref_info, xr_settings_t settings) {
PFN_xrEnumerateRenderModelPathsFB xrEnumerateRenderModelPathsFB;
XrResult error = xrGetInstanceProcAddr(xr_instance, "xrEnumerateViveTrackerPathsHTCX", (PFN_xrVoidFunction *)(&xrEnumerateRenderModelPathsFB));
if (XR_FAILED(error)) return error;

uint32_t count = 0;
error = xrEnumerateRenderModelPathsFB(xr_session, 0, &count, nullptr);
array_t<XrRenderModelPathInfoFB> model_paths(count, XrRenderModelPathInfoFB{ XR_TYPE_RENDER_MODEL_PATH_INFO_FB });
xrEnumerateRenderModelPathsFB(xr_session, count, &count, model_paths.data);

for (size_t i = 0; i < model_paths.count; i++) {
ref_info->items.add({ openxr_path_string(model_paths[i].path) });
}
model_paths.free();
return error;
};
xr_misc_enums.add(info);

info = { "xrEnumerateViveTrackerPathsHTCX" };
info.source_type_name = "XrViveTrackerPathsHTCX";
info.spec_link = "XrViveTrackerPathsHTCX";
Expand All @@ -882,25 +851,56 @@ void openxr_register_enums() {
};
xr_misc_enums.add(info);

info = { "xrEnumerateRenderModelPathsFB" };
info.source_type_name = "XrRenderModelPathInfoFB";
info.spec_link = "XrRenderModelPathInfoFB";
info.requires_session = true;
info = { "xrEnumerateReprojectionModesMSFT" };
info.source_type_name = "XrReprojectionModeMSFT";
info.spec_link = "XrReprojectionModeMSFT";
info.requires_session = false;
info.tag = display_tag_misc;
info.load_info = [](xr_enum_info_t *ref_info, xr_settings_t settings) {
PFN_xrEnumerateRenderModelPathsFB xrEnumerateRenderModelPathsFB;
XrResult error = xrGetInstanceProcAddr(xr_instance, "xrEnumerateViveTrackerPathsHTCX", (PFN_xrVoidFunction *)(&xrEnumerateRenderModelPathsFB));
PFN_xrEnumerateReprojectionModesMSFT xrEnumerateReprojectionModesMSFT;
XrResult error = xrGetInstanceProcAddr(xr_instance, "xrEnumerateReprojectionModesMSFT", (PFN_xrVoidFunction *)(&xrEnumerateReprojectionModesMSFT));
if (XR_FAILED(error)) return error;

uint32_t count = 0;
error = xrEnumerateRenderModelPathsFB(xr_session, 0, &count, nullptr);
array_t<XrRenderModelPathInfoFB> model_paths(count, XrRenderModelPathInfoFB{ XR_TYPE_RENDER_MODEL_PATH_INFO_FB });
xrEnumerateRenderModelPathsFB(xr_session, count, &count, model_paths.data);
error = xrEnumerateReprojectionModesMSFT(xr_instance, xr_system_id, xr_view.current_config, 0, &count, nullptr);
array_t<XrReprojectionModeMSFT> reprojection_modes(count, (XrReprojectionModeMSFT)0);
xrEnumerateReprojectionModesMSFT(xr_instance, xr_system_id, xr_view.current_config, count, &count, reprojection_modes.data);

for (size_t i = 0; i < model_paths.count; i++) {
ref_info->items.add({ openxr_path_string(model_paths[i].path) });
for (size_t i = 0; i < reprojection_modes.count; i++) {
switch (reprojection_modes[i]) {
#define CASE_GET_NAME(e, val) case e: ref_info->items.add({ #e }); break;
XR_LIST_ENUM_XrReprojectionModeMSFT(CASE_GET_NAME)
#undef CASE_GET_NAME
}
}
model_paths.free();
reprojection_modes.free();
return error;
};
xr_misc_enums.add(info);

info = { "xrEnumerateSceneComputeFeaturesMSFT" };
info.source_type_name = "XrSceneComputeFeatureMSFT";
info.spec_link = "XrSceneComputeFeatureMSFT";
info.requires_session = false;
info.tag = display_tag_misc;
info.load_info = [](xr_enum_info_t *ref_info, xr_settings_t settings) {
PFN_xrEnumerateSceneComputeFeaturesMSFT xrEnumerateSceneComputeFeaturesMSFT;
XrResult error = xrGetInstanceProcAddr(xr_instance, "xrEnumerateSceneComputeFeaturesMSFT", (PFN_xrVoidFunction *)(&xrEnumerateSceneComputeFeaturesMSFT));
if (XR_FAILED(error)) return error;

uint32_t count = 0;
error = xrEnumerateSceneComputeFeaturesMSFT(xr_instance, xr_system_id, 0, &count, nullptr);
array_t<XrSceneComputeFeatureMSFT> compute_features(count, (XrSceneComputeFeatureMSFT)0);
xrEnumerateSceneComputeFeaturesMSFT(xr_instance, xr_system_id, count, &count, compute_features.data);

for (size_t i = 0; i < compute_features.count; i++) {
switch (compute_features[i]) {
#define CASE_GET_NAME(e, val) case e: ref_info->items.add({ #e }); break;
XR_LIST_ENUM_XrSceneComputeFeatureMSFT(CASE_GET_NAME)
#undef CASE_GET_NAME
}
}
compute_features.free();
return error;
};
xr_misc_enums.add(info);
Expand Down

0 comments on commit e9f109a

Please sign in to comment.