forked from KhronosGroup/OpenXR-SDK-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenXR 1.0.3 release (7-October-2019)
Patch release for the 1.0 series. Note that this release includes changes to adjust the symbol exports from dynamic library versions of the loader to align with the specification. Only **core** symbols are currently exported. All extension symbols must be retrieved using `xrGetInstanceProcAddr`. ### GitHub Pull Requests These had been integrated into the public repo incrementally. - General, Build, Other - KhronosGroup#139 - Write output atomically at the end of generator scripts - KhronosGroup#119 - Loader test updates. - KhronosGroup#116 - Static analysis cleanups. - Loader - KhronosGroup#140 - Permit broader valid usage re: layers - KhronosGroup#133 - Remove shwapi dependency - KhronosGroup#132 - Fix directory searching for layers - KhronosGroup#130 - Fix exporting of symbols on Windows. - KhronosGroup#129 - Remove debug ext only when added by loader - fixes usage of debug ext on runtimes that do not provide it themselves. - KhronosGroup#125 - Include a `OutputDebugString` logger for Win32 - Layers - KhronosGroup#138 - Don't validate output enum buffer values - KhronosGroup#137 - Fix incorrect filenames in the generated API layer JSON ### Internal issues - General, Build, Other - Fix warnings in MSVC static code analysis mode (internal MR 1574) - Validation layer improvements and fixes (internal MR 1568) - Update vendored jsoncpp to 1.9.1 (internal MR 1523) - Loader - Add ability to quiet the loader's default output (internal MR 1576) - Fix conformance of loader in `xrEnumerateApiLayerProperties`/`xrEnumerateInstanceExtensionProperties` - hello_xr - Simplify action usage in hello_xr (internal MR 1553) - Registry - Add `XR_EXT_view_configuration_depth_range` extension (internal MR 1502, internal issue 1201) - Reserve a Monado extension (internal MR 1541)
- Loading branch information
Showing
98 changed files
with
3,997 additions
and
4,628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
// limitations under the License. | ||
// | ||
// Author: Mark Young <[email protected]>, Ryan Pavlik <[email protected]> | ||
// Author: Dave Houlton <[email protected]> | ||
// | ||
|
||
#include "object_info.h" | ||
|
@@ -32,6 +33,8 @@ | |
#include <string> | ||
#include <vector> | ||
|
||
#include "memory.h" | ||
|
||
std::string XrSdkLogObjectInfo::ToString() const { | ||
std::ostringstream oss; | ||
oss << Uint64ToHexString(handle); | ||
|
@@ -238,44 +241,45 @@ NamesAndLabels DebugUtilsData::PopulateNamesAndLabels(std::vector<XrSdkLogObject | |
return {objects, labels}; | ||
} | ||
|
||
AugmentedCallbackData DebugUtilsData::AugmentCallbackData( | ||
const XrDebugUtilsMessengerCallbackDataEXT& provided_callback_data) const { | ||
AugmentedCallbackData ret{provided_callback_data}; | ||
if (object_info_.Empty() || provided_callback_data.objectCount == 0) { | ||
return ret; | ||
void DebugUtilsData::WrapCallbackData(AugmentedCallbackData* aug_data, | ||
const XrDebugUtilsMessengerCallbackDataEXT* callback_data) const { | ||
// If there's nothing to add, just return the original data as the augmented copy | ||
aug_data->exported_data = callback_data; | ||
if (object_info_.Empty() || callback_data->objectCount == 0) { | ||
return; | ||
} | ||
bool obj_name_found = false; | ||
for (uint32_t obj = 0; obj < provided_callback_data.objectCount; ++obj) { | ||
auto& current_obj = provided_callback_data.objects[obj]; | ||
if (!obj_name_found) { | ||
auto lookup = object_info_.LookUpStoredObjectInfo(current_obj.objectHandle, current_obj.objectType); | ||
if (lookup != nullptr) { | ||
obj_name_found = true; | ||
} | ||
} | ||
|
||
// If this is a session, see if there are any labels associated with it for us to add | ||
// to the callback content. | ||
// Inspect each of the callback objects | ||
bool name_found = false; | ||
for (uint32_t obj = 0; obj < callback_data->objectCount; ++obj) { | ||
auto& current_obj = callback_data->objects[obj]; | ||
name_found |= (nullptr != object_info_.LookUpStoredObjectInfo(current_obj.objectHandle, current_obj.objectType)); | ||
|
||
// If this is a session, record any labels associated with it | ||
if (XR_OBJECT_TYPE_SESSION == current_obj.objectType) { | ||
XrSession session = TreatIntegerAsHandle<XrSession>(current_obj.objectHandle); | ||
LookUpSessionLabels(session, ret.labels); | ||
LookUpSessionLabels(session, aug_data->labels); | ||
} | ||
} | ||
|
||
if (!obj_name_found && ret.labels.empty()) { | ||
// nothing to add to the data | ||
return ret; | ||
// If we found nothing to add, return the original data | ||
if (!name_found && aug_data->labels.empty()) { | ||
return; | ||
} | ||
|
||
// If a name or a label has been found, we should update it in a new version of the callback data | ||
ret.new_objects.assign(provided_callback_data.objects, provided_callback_data.objects + provided_callback_data.objectCount); | ||
// Found additional data - modify an internal copy and return that as the exported data | ||
memcpy(&aug_data->modified_data, callback_data, sizeof(XrDebugUtilsMessengerCallbackDataEXT)); | ||
aug_data->new_objects.assign(callback_data->objects, callback_data->objects + callback_data->objectCount); | ||
|
||
for (auto& obj : ret.new_objects) { | ||
// Record (overwrite) the names of all incoming objects provided in our internal list | ||
for (auto& obj : aug_data->new_objects) { | ||
object_info_.LookUpObjectName(obj); | ||
} | ||
ret.temporary_callback_data.objects = ret.new_objects.data(); | ||
ret.temporary_callback_data.sessionLabelCount = static_cast<uint32_t>(ret.labels.size()); | ||
ret.temporary_callback_data.sessionLabels = ret.labels.empty() ? nullptr : ret.labels.data(); | ||
ret.callback_data_to_use = &ret.temporary_callback_data; | ||
return ret; | ||
|
||
// Update local copy & point export to it | ||
aug_data->modified_data.objects = aug_data->new_objects.data(); | ||
aug_data->modified_data.sessionLabelCount = static_cast<uint32_t>(aug_data->labels.size()); | ||
aug_data->modified_data.sessionLabels = aug_data->labels.empty() ? nullptr : aug_data->labels.data(); | ||
aug_data->exported_data = &aug_data->modified_data; | ||
return; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.