diff --git a/.reuse/dep5 b/.reuse/dep5 index cedb22dd..c905fc9a 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: OpenXR Upstream-Contact: Ryan Pavlik -Source: https://khronos.org/registry/OpenXR/ +Source: https://registry.khronos.org/OpenXR/ Files: changes/conformance/* changes/registry/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 43ab332b..03df11be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ cmake_minimum_required(VERSION 3.0) project(OPENXR) find_package(PythonInterp 3) +include(CTest) # Enable IDE GUI folders. "Helper targets" that don't have interesting source code should set their FOLDER property to this set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/changes/conformance/mr.2861.gl.md b/changes/conformance/mr.2861.gl.md new file mode 100644 index 00000000..e791ba77 --- /dev/null +++ b/changes/conformance/mr.2861.gl.md @@ -0,0 +1,4 @@ +--- +- mr.2861.gl +--- +New test: Add additional tests for `XR_EXT_debug_utils` based on the test app `loader_test`. diff --git a/changes/conformance/mr.2935.gl.md b/changes/conformance/mr.2935.gl.md new file mode 100644 index 00000000..9394ebaa --- /dev/null +++ b/changes/conformance/mr.2935.gl.md @@ -0,0 +1 @@ +Update Khronos registry URLs in comments. diff --git a/maintainer-scripts/common.sh b/maintainer-scripts/common.sh index 065300c2..540578be 100644 --- a/maintainer-scripts/common.sh +++ b/maintainer-scripts/common.sh @@ -187,6 +187,7 @@ getSDKSourceFilenames() { maintainer-scripts/build-and-publish-aar-snapshot.sh \ maintainer-scripts/publish-aar \ specification/.gitignore \ + specification/config/attribs.adoc \ specification/registry/*.xml \ specification/scripts \ specification/loader \ diff --git a/specification/Makefile b/specification/Makefile index fcf69338..c9f16147 100644 --- a/specification/Makefile +++ b/specification/Makefile @@ -32,7 +32,7 @@ ifneq (,$(strip $(VERY_STRICT))) ASCIIDOC := $(ASCIIDOC) --failure-level WARN endif -SPECREVISION = 1.0.29 +SPECREVISION = 1.0.30 REVISION_COMPONENTS = $(subst ., ,$(SPECREVISION)) MAJORMINORVER = $(word 1,$(REVISION_COMPONENTS)).$(word 2,$(REVISION_COMPONENTS)) @@ -57,7 +57,7 @@ PYAPIMAP := $(GENDIR)/apimap.py RBAPIMAP := $(GENDIR)/apimap.rb METADIR := $(GENDIR)/meta -VK_REF_PAGE_ROOT := https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html +VK_REF_PAGE_ROOT := https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/ MAKE_RELATIVE = $(patsubst $(CURDIR)/%,%,$(1)) @@ -406,7 +406,7 @@ MANSOURCES = $(CORESOURCES) $(VENSOURCES) $(KHRSOURCES) MANGENERATED = $(wildcard $(REFPATH)/*) MANHTML = $(MANSOURCES:$(REFPATH)/%.txt=$(MANHTMLDIR)/%.html) MANDEPS = $(GENINCLUDE) $(GENDEPENDS) -HTML_SPEC_RELATIVE ?= ../../$(SPEC_FILENAME_STEM).html +HTML_SPEC_RELATIVE ?= ../../html/$(SPEC_FILENAME_STEM).html # Asciidoctor options to build refpages # @@ -421,8 +421,7 @@ ADOCREFOPTS = -a stylesheet=khronos.css \ -a refprefix='refpage.' \ -a isrefpage \ -a html_spec_relative='$(HTML_SPEC_RELATIVE)' \ - -a imagesdir=$(CURDIR)/sources \ - -a vkRefPageRoot='$(VK_REF_PAGE_ROOT)' + -a imagesdir=$(CURDIR)/sources # Pure makefile lowercase function, generated by a script. make_lower = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1))))))))))))))))))))))))))) diff --git a/specification/registry/xr.xml b/specification/registry/xr.xml index add5a2c7..7bbddee4 100644 --- a/specification/registry/xr.xml +++ b/specification/registry/xr.xml @@ -82,7 +82,6 @@ maintained in the default branch of the Khronos OpenXR GitHub project. - @@ -132,7 +131,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. updates them automatically by processing a line at a time. --> // OpenXR current version number. -#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 29) +#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 30) - typedef void *(*PFN_xrEglGetProcAddressMNDX)(const char *name); + typedef PFN_xrVoidFunction (*PFN_xrEglGetProcAddressMNDX)(const char *name); XrStructureType type @@ -1491,7 +1490,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrStructureType type const void* next XrSpatialGraphNodeTypeMSFT nodeType - uint8_t nodeId[XR_GUID_SIZE_MSFT] + uint8_t nodeId[XR_GUID_SIZE_MSFT] XrPosef pose @@ -1508,7 +1507,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrStructureType type void* next - uint8_t nodeId[XR_GUID_SIZE_MSFT] + uint8_t nodeId[XR_GUID_SIZE_MSFT] XrPosef poseInNodeSpace @@ -1890,8 +1889,8 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrStructureType type void* next - char parentNodeName[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT] - char nodeName[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT] + char parentNodeName[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT] + char nodeName[XR_MAX_CONTROLLER_MODEL_NODE_NAME_SIZE_MSFT] XrStructureType type @@ -2281,7 +2280,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrStructureType type void* next uint32_t vendorId - char modelName[XR_MAX_RENDER_MODEL_NAME_SIZE_FB] + char modelName[XR_MAX_RENDER_MODEL_NAME_SIZE_FB] XrRenderModelKeyFB modelKey uint32_t modelVersion XrRenderModelFlagsFB flags @@ -2508,7 +2507,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. uint64_t trackedKeyboardId XrVector3f size XrKeyboardTrackingFlagsFB flags - char name[XR_MAX_KEYBOARD_TRACKING_NAME_SIZE_FB] + char name[XR_MAX_KEYBOARD_TRACKING_NAME_SIZE_FB] XrStructureType type @@ -2631,12 +2630,12 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrStructureType type const void* next - XrColor4f textureColorMap[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB] + XrColor4f textureColorMap[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB] XrStructureType type const void* next - uint8_t textureColorMap[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB] + uint8_t textureColorMap[XR_PASSTHROUGH_COLOR_MAP_MONO_SIZE_FB] XrStructureType type @@ -5102,7 +5101,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrResult xrSetColorSpaceFB XrSession session - const XrColorSpaceFB colorspace + const XrColorSpaceFB colorSpace @@ -5524,7 +5523,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrResult xrSetMarkerTrackingPredictionVARJO XrSession session uint64_t markerId - XrBool32 enabled + XrBool32 enable @@ -6272,6 +6271,18 @@ maintained in the default branch of the Khronos OpenXR GitHub project. + + + + + + + + + + + + @@ -6316,6 +6327,32 @@ maintained in the default branch of the Khronos OpenXR GitHub project. + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6619,7 +6656,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. - + @@ -10510,10 +10547,11 @@ maintained in the default branch of the Khronos OpenXR GitHub project. - + + @@ -10530,6 +10568,13 @@ maintained in the default branch of the Khronos OpenXR GitHub project. + + + + + + + @@ -10538,19 +10583,22 @@ maintained in the default branch of the Khronos OpenXR GitHub project. + + + - - - - + + + + @@ -11384,10 +11432,33 @@ maintained in the default branch of the Khronos OpenXR GitHub project. - + - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/specification/scripts/genRef.py b/specification/scripts/genRef.py index 5a72a6ac..04184010 100644 --- a/specification/scripts/genRef.py +++ b/specification/scripts/genRef.py @@ -882,15 +882,14 @@ def genExtension(baseDir, extpath, name, info): fp = open(pageName, 'w', encoding='utf-8') # OpenXR-specific - sections = OrderedDict() - sections['Specification'] = 'See link:{html_spec_relative}#%s[ %s] in the main specification for complete information.' % ( - name, name) + ref_page_sections = OrderedDict() + ref_page_sections['Specification'] = f'See link:{{html_spec_relative}}#{name}[{name}] in the main specification for complete information.' refPageShell(name, "{} extension".format(ext_type), fp, appbody, - sections=sections, + sections=ref_page_sections, tail_content=tail_content) # Restore leveloffset for boilerplate in refPageTail diff --git a/specification/scripts/spec_tools/entity_db.py b/specification/scripts/spec_tools/entity_db.py index 99a7d62e..e408c0a6 100644 --- a/specification/scripts/spec_tools/entity_db.py +++ b/specification/scripts/spec_tools/entity_db.py @@ -287,7 +287,7 @@ def getMemberNames(self, commandOrStruct): ret = [] for member in members: name_tag = member.find('name') - if name_tag: + if name_tag is not None: ret.append(name_tag.text) return ret diff --git a/specification/scripts/validitygenerator.py b/specification/scripts/validitygenerator.py index b121f705..5b18c112 100644 --- a/specification/scripts/validitygenerator.py +++ b/specification/scripts/validitygenerator.py @@ -1086,8 +1086,8 @@ def makeStructureExtensionPointer(self, blockname, param): self.logMsg( 'diag', 'makeStructureExtensionPointer: struct', struct, 'IS NOT required') - entry += '{} must: be {} or a valid pointer to the <>'.format( - self.makeParameterName(param_name), self.null) + link = "link:{uri-next-chain}[next structure in a structure chain]" + entry += f'{self.makeParameterName(param_name)} must: be {self.null} or a valid pointer to the {link}' if not extensionstructs: return entry entry += '. See also: ' diff --git a/specification/scripts/xrconventions.py b/specification/scripts/xrconventions.py index 2d59c0c5..0c650699 100644 --- a/specification/scripts/xrconventions.py +++ b/specification/scripts/xrconventions.py @@ -205,7 +205,7 @@ def specURL(self, spectype='api'): instead. N.b. this may need to change on a per-refpage basis if there are multiple documents involved. """ - return 'https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html' + return 'https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html' @property def xml_api_name(self): diff --git a/src/conformance/conformance_test/test_XR_EXT_debug_utils.cpp b/src/conformance/conformance_test/test_XR_EXT_debug_utils.cpp index 751defe6..fd7ad703 100644 --- a/src/conformance/conformance_test/test_XR_EXT_debug_utils.cpp +++ b/src/conformance/conformance_test/test_XR_EXT_debug_utils.cpp @@ -225,6 +225,25 @@ namespace Conformance return false; } + static const DebugUtilsCallbackInfo& findMessageByMessageId(const std::vector& callbackInfos, + const char* messageId) + { + { + size_t messageMatchCount = 0; + for (const auto& callbackInfo : callbackInfos) { + if (strcmp(callbackInfo.callbackData.messageId, messageId) == 0) { + messageMatchCount++; + } + } + REQUIRE(messageMatchCount == 1); + } + auto it = std::find_if(callbackInfos.begin(), callbackInfos.end(), [messageId](const auto& callbackInfo) { + return strcmp(callbackInfo.callbackData.messageId, messageId) == 0; + }); + REQUIRE(it != callbackInfos.end()); + return *it; + } + TEST_CASE("XR_EXT_debug_utils", "") { GlobalData& globalData = GetGlobalData(); @@ -720,24 +739,6 @@ namespace Conformance SECTION("Test object names") { - auto findMessageByMessageId = [](const std::vector& callbackInfos, - const char* messageId) -> const DebugUtilsCallbackInfo& { - { - size_t messageMatchCount = 0; - for (const auto& callbackInfo : callbackInfos) { - if (strcmp(callbackInfo.callbackData.messageId, messageId) == 0) { - messageMatchCount++; - } - } - REQUIRE(messageMatchCount == 1); - } - auto it = std::find_if(callbackInfos.begin(), callbackInfos.end(), [messageId](const auto& callbackInfo) { - return strcmp(callbackInfo.callbackData.messageId, messageId) == 0; - }); - REQUIRE(it != callbackInfos.end()); - return *it; - }; - AutoBasicInstance instance({XR_EXT_DEBUG_UTILS_EXTENSION_NAME}); auto pfn_create_debug_utils_messager_ext = @@ -770,8 +771,6 @@ namespace Conformance object.objectName = "My Instance Obj"; REQUIRE_RESULT(XR_SUCCESS, pfn_set_obj_name(instance, &object)); - // TODO: validate objectName works (in a separate test case) - { XrDebugUtilsMessengerCallbackDataEXT callback_data{XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT}; callback_data.messageId = "General Error"; @@ -800,19 +799,6 @@ namespace Conformance XrDebugUtilsLabelEXT first_label = {XR_TYPE_DEBUG_UTILS_LABEL_EXT}; first_label.labelName = first_individual_label_name; - // TODO: Invalid parameters might be better as a separate test case - SECTION("Invalid parameters") - { - // Try invalid session on each of the label functions - REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_begin_debug_utils_label_region_ext(XR_NULL_HANDLE, &first_label)); - REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_end_debug_utils_label_region_ext(XR_NULL_HANDLE)); - REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_insert_debug_utils_label_ext(XR_NULL_HANDLE, &first_label)); - - // Try with nullptr for the label - REQUIRE_RESULT(XR_ERROR_VALIDATION_FAILURE, pfn_begin_debug_utils_label_region_ext(session, nullptr)); - REQUIRE_RESULT(XR_ERROR_VALIDATION_FAILURE, pfn_insert_debug_utils_label_ext(session, nullptr)); - } - // Set it up to put in the session and instance to any debug utils messages XrDebugUtilsMessengerCallbackDataEXT callback_data{XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT}; callback_data.messageId = "General Error"; @@ -921,7 +907,6 @@ namespace Conformance // End the last (most recent) label region { REQUIRE_RESULT(XR_SUCCESS, pfn_end_debug_utils_label_region_ext(session)); - // TODO: need a test for end a label region that has not been started } // Trigger a message and make sure we see "First Label Region" @@ -964,7 +949,159 @@ namespace Conformance REQUIRE_RESULT(XR_SUCCESS, pfn_destroy_debug_utils_messager_ext(debug_utils_messenger)); } - // https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_debug_utils + SECTION("Object naming") + { + AutoBasicInstance instance({XR_EXT_DEBUG_UTILS_EXTENSION_NAME}); + AutoBasicSession session(AutoBasicSession::createSession, instance); + + auto pfn_create_debug_utils_messager_ext = + GetInstanceExtensionFunction(instance, "xrCreateDebugUtilsMessengerEXT"); + auto pfn_destroy_debug_utils_messager_ext = + GetInstanceExtensionFunction(instance, "xrDestroyDebugUtilsMessengerEXT"); + auto pfn_submit_dmsg = GetInstanceExtensionFunction(instance, "xrSubmitDebugUtilsMessageEXT"); + auto pfn_set_obj_name = + GetInstanceExtensionFunction(instance, "xrSetDebugUtilsObjectNameEXT"); + + // Create the debug utils messenger + std::vector callbackInfo; + + XrDebugUtilsMessengerCreateInfoEXT dbg_msg_ci = {XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT}; + dbg_msg_ci.messageSeverities = XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT; + dbg_msg_ci.messageTypes = XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT; + dbg_msg_ci.userCallback = addToDebugUtilsCallbackInfoVector; + dbg_msg_ci.userData = reinterpret_cast(&callbackInfo); + + XrDebugUtilsMessengerEXT debug_utils_messenger = XR_NULL_HANDLE; + REQUIRE_RESULT(XR_SUCCESS, pfn_create_debug_utils_messager_ext(instance, &dbg_msg_ci, &debug_utils_messenger)); + + // Set object name + XrDebugUtilsObjectNameInfoEXT referenceObject{XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT}; + referenceObject.objectType = XR_OBJECT_TYPE_INSTANCE; + referenceObject.objectHandle = MakeHandleGeneric(instance.GetInstance()); + referenceObject.objectName = "My Instance Obj"; + REQUIRE_RESULT(XR_SUCCESS, pfn_set_obj_name(instance, &referenceObject)); + + // Check object names + { + std::array objects; + objects.fill({XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT}); + // We pass an object with a name we expect to be overridden with the correct name + objects[0].objectType = XR_OBJECT_TYPE_INSTANCE; + objects[0].objectHandle = MakeHandleGeneric(instance.GetInstance()); + objects[0].objectName = "Not my instance"; + // and we pass an object with a name we expect to stay + objects[1].objectType = XR_OBJECT_TYPE_SESSION; + objects[1].objectHandle = MakeHandleGeneric(session.GetSession()); + objects[1].objectName = "My Session Obj"; + + XrDebugUtilsMessengerCallbackDataEXT callback_data{XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT}; + callback_data.messageId = "Object Name Test"; + callback_data.functionName = "MyTestFunctionName"; + callback_data.message = "Object name"; + callback_data.objectCount = static_cast(objects.size()); + callback_data.objects = objects.data(); + REQUIRE_RESULT(XR_SUCCESS, pfn_submit_dmsg(instance, XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, + XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT, &callback_data)); + + const auto& cb = findMessageByMessageId(callbackInfo, callback_data.messageId); + + REQUIRE(cb.callbackData.objectCount == 2); + + // We expect that the Instance name will be filled by the debug utils implementation + REQUIRE(cb.callbackData.objects[0].objectName != nullptr); + REQUIRE_THAT(cb.callbackData.objects[0].objectName, Catch::Matchers::Equals(referenceObject.objectName)); + + // We expect that the passed name will not be overridden / removed + REQUIRE(cb.callbackData.objects[1].objectName != nullptr); + REQUIRE_THAT(cb.callbackData.objects[1].objectName, Catch::Matchers::Equals(objects[1].objectName)); + } + + // Unset object name + // https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrSetDebugUtilsObjectNameEXT.html + // If XrDebugUtilsObjectNameInfoEXT::objectName is an empty string, then any previously set name is removed. + XrDebugUtilsObjectNameInfoEXT unsetObject{XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT}; + unsetObject.objectType = XR_OBJECT_TYPE_INSTANCE; + unsetObject.objectHandle = MakeHandleGeneric(instance.GetInstance()); + unsetObject.objectName = ""; + REQUIRE_RESULT(XR_SUCCESS, pfn_set_obj_name(instance, &unsetObject)); + + { + XrDebugUtilsObjectNameInfoEXT object{XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT}; + object.objectType = XR_OBJECT_TYPE_INSTANCE; + object.objectHandle = MakeHandleGeneric(instance.GetInstance()); + object.objectName = nullptr; + + XrDebugUtilsMessengerCallbackDataEXT callback_data{XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT}; + callback_data.messageId = "Object Name Test Removed"; + callback_data.functionName = "MyTestFunctionName"; + callback_data.message = "Object name"; + callback_data.objectCount = 1; + callback_data.objects = &object; + REQUIRE_RESULT(XR_SUCCESS, pfn_submit_dmsg(instance, XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, + XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT, &callback_data)); + + const auto& cb = findMessageByMessageId(callbackInfo, callback_data.messageId); + + REQUIRE(cb.callbackData.objectCount == 1); + + // We expect that the Instance name will NOT be filled by the debug utils implementation + REQUIRE(cb.callbackData.objects[0].objectName == nullptr); + } + + // Destroy what we created + REQUIRE_RESULT(XR_SUCCESS, pfn_destroy_debug_utils_messager_ext(debug_utils_messenger)); + } + + SECTION("Invalid parameters") + { + AutoBasicInstance instance({XR_EXT_DEBUG_UTILS_EXTENSION_NAME}); + + auto pfn_begin_debug_utils_label_region_ext = GetInstanceExtensionFunction( + instance, "xrSessionBeginDebugUtilsLabelRegionEXT"); + auto pfn_end_debug_utils_label_region_ext = + GetInstanceExtensionFunction(instance, "xrSessionEndDebugUtilsLabelRegionEXT"); + auto pfn_insert_debug_utils_label_ext = + GetInstanceExtensionFunction(instance, "xrSessionInsertDebugUtilsLabelEXT"); + + AutoBasicSession session(AutoBasicSession::createSession | AutoBasicSession::createSpaces | AutoBasicSession::createSwapchains, + instance); + FrameIterator frameIterator(&session); + + { + // auto pfn_set_obj_name = + // GetInstanceExtensionFunction(instance, "xrSetDebugUtilsObjectNameEXT"); + // Cannot try invalid instance on set object name as loader will crash + // REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_set_obj_name(XR_NULL_HANDLE, nullptr)); + // Cannot try nullptr for the object name info as loader will crash + // REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_set_obj_name(instance, nullptr)); + } + + // Try invalid session on each of the label functions + { + // Create a label struct for initial testing + XrDebugUtilsLabelEXT label = {XR_TYPE_DEBUG_UTILS_LABEL_EXT}; + label.labelName = "individual label"; + + REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_begin_debug_utils_label_region_ext(XR_NULL_HANDLE, &label)); + REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_end_debug_utils_label_region_ext(XR_NULL_HANDLE)); + REQUIRE_RESULT(XR_ERROR_HANDLE_INVALID, pfn_insert_debug_utils_label_ext(XR_NULL_HANDLE, &label)); + } + + // Try with nullptr for the label + { + REQUIRE_RESULT(XR_ERROR_VALIDATION_FAILURE, pfn_begin_debug_utils_label_region_ext(session, nullptr)); + REQUIRE_RESULT(XR_ERROR_VALIDATION_FAILURE, pfn_insert_debug_utils_label_ext(session, nullptr)); + } + + // Try to end a label region that has not been started + { + // This seems like an error condition but the OpenXR Loader does not return an error + // here so we need the same behavior. + REQUIRE_RESULT(XR_SUCCESS, pfn_end_debug_utils_label_region_ext(session)); + } + } + + // https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_debug_utils // The OpenXR spec provides some examples of how to use the extension; they are not full // examples but let's make sure that something equivalent to them works. // Example 1 / multiple callbacks diff --git a/src/conformance/framework/graphics_plugin_opengl.cpp b/src/conformance/framework/graphics_plugin_opengl.cpp index b2d06d96..670aa0b1 100644 --- a/src/conformance/framework/graphics_plugin_opengl.cpp +++ b/src/conformance/framework/graphics_plugin_opengl.cpp @@ -43,12 +43,12 @@ // XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT: can be bound to a framebuffer as color // XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT: can be bound to a framebuffer as depth (or stencil-only GL_STENCIL_INDEX8) // XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT: image load/store and core since 4.2. -// List of supported formats is in https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_image_load_store.txt +// List of supported formats is in https://registry.khronos.org/OpenGL/extensions/ARB/ARB_shader_image_load_store.txt // XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT & XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT: must be compatible format with glCopyTexImage* calls // XR_SWAPCHAIN_USAGE_SAMPLED_BIT: can be sampled in a shader // XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT: all GL formats are typed, but some can be reinterpreted with a different view. // OpenGL 4.2 / 4.3 with MSAA. Only for color formats and compressed ones -// List with compatible textures: https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_texture_view.txt +// List with compatible textures: https://registry.khronos.org/OpenGL/extensions/ARB/ARB_texture_view.txt // Note: no GL formats are "mutableFormats" in the sense of SwapchainCreateTestParameters as this is intended for TYPELESS, // however, some are "supportsMutableFormat" diff --git a/src/loader/api_layer_interface.cpp b/src/loader/api_layer_interface.cpp index 5560c31a..c9e24ec4 100644 --- a/src/loader/api_layer_interface.cpp +++ b/src/loader/api_layer_interface.cpp @@ -237,21 +237,23 @@ XrResult ApiLayerInterface::LoadApiLayers(const std::string& openxr_command, uin for (const auto& layer_name : enabled_explicit_api_layer_names) { bool found_this_layer = false; - for (auto it = explicit_layer_manifest_files.begin(); it != explicit_layer_manifest_files.end();) { - bool erased_layer_manifest_file = false; - - if (layers_already_found.count(layer_name) > 0) { - found_this_layer = true; - } else if (layer_name == (*it)->LayerName()) { - found_this_layer = true; - layers_already_found.insert(layer_name); - enabled_layer_manifest_files_in_init_order.push_back(std::move(*it)); - it = explicit_layer_manifest_files.erase(it); - erased_layer_manifest_file = true; - } + if (layers_already_found.count(layer_name) > 0) { + found_this_layer = true; + } else { + for (auto it = explicit_layer_manifest_files.begin(); it != explicit_layer_manifest_files.end();) { + bool erased_layer_manifest_file = false; + + if (layer_name == (*it)->LayerName()) { + found_this_layer = true; + layers_already_found.insert(layer_name); + enabled_layer_manifest_files_in_init_order.push_back(std::move(*it)); + it = explicit_layer_manifest_files.erase(it); + erased_layer_manifest_file = true; + } - if (!erased_layer_manifest_file) { - it++; + if (!erased_layer_manifest_file) { + it++; + } } } diff --git a/src/loader/images/high_level_loader_black.png b/src/loader/images/high_level_loader_black.png deleted file mode 100644 index c4479bb9..00000000 Binary files a/src/loader/images/high_level_loader_black.png and /dev/null differ diff --git a/src/loader/images/high_level_loader_black.png.license b/src/loader/images/high_level_loader_black.png.license deleted file mode 100644 index c57cf3ca..00000000 --- a/src/loader/images/high_level_loader_black.png.license +++ /dev/null @@ -1,3 +0,0 @@ -Copyright 2017, Lunar-G - -SPDX-License-Identifier: CC-BY-4.0 diff --git a/src/loader/images/instance_call_chain_black.png b/src/loader/images/instance_call_chain_black.png deleted file mode 100644 index 39ff943a..00000000 Binary files a/src/loader/images/instance_call_chain_black.png and /dev/null differ diff --git a/src/loader/images/instance_call_chain_black.png.license b/src/loader/images/instance_call_chain_black.png.license deleted file mode 100644 index c57cf3ca..00000000 --- a/src/loader/images/instance_call_chain_black.png.license +++ /dev/null @@ -1,3 +0,0 @@ -Copyright 2017, Lunar-G - -SPDX-License-Identifier: CC-BY-4.0 diff --git a/src/loader/images/loader_layer_order_calls_black.png b/src/loader/images/loader_layer_order_calls_black.png deleted file mode 100644 index b577142e..00000000 Binary files a/src/loader/images/loader_layer_order_calls_black.png and /dev/null differ diff --git a/src/loader/images/loader_layer_order_calls_black.png.license b/src/loader/images/loader_layer_order_calls_black.png.license deleted file mode 100644 index c57cf3ca..00000000 --- a/src/loader/images/loader_layer_order_calls_black.png.license +++ /dev/null @@ -1,3 +0,0 @@ -Copyright 2017, Lunar-G - -SPDX-License-Identifier: CC-BY-4.0