···760760761761#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
762762static bool
763763-_match_wl_entry(const char *wl_entry, VkDisplayPropertiesKHR *disp)
763763+_match_allowlist_entry(const char *al_entry, VkDisplayPropertiesKHR *disp)
764764{
765765- unsigned long wl_entry_length = strlen(wl_entry);
765765+ unsigned long al_entry_length = strlen(al_entry);
766766 unsigned long disp_entry_length = strlen(disp->displayName);
767767- if (disp_entry_length < wl_entry_length)
767767+ if (disp_entry_length < al_entry_length)
768768 return false;
769769770770- // we have a match with this whitelist entry.
771771- if (strncmp(wl_entry, disp->displayName, wl_entry_length) == 0)
770770+ // we have a match with this allowlist entry.
771771+ if (strncmp(al_entry, disp->displayName, al_entry_length) == 0)
772772 return true;
773773774774 return false;
···814814815815 for (uint32_t i = 0; i < display_count; i++) {
816816 VkDisplayPropertiesKHR *disp = display_props + i;
817817- // check this display against our whitelist
818818- for (uint32_t j = 0; j < ARRAY_SIZE(NV_DIRECT_WHITELIST); j++) {
819819- if (_match_wl_entry(NV_DIRECT_WHITELIST[j], disp)) {
817817+ // check this display against our allowlist
818818+ for (uint32_t j = 0; j < ARRAY_SIZE(NV_DIRECT_ALLOWLIST); j++) {
819819+ if (_match_allowlist_entry(NV_DIRECT_ALLOWLIST[j], disp)) {
820820 free(display_props);
821821 return true;
822822 }
823823 }
824824825825- if (c->settings.nvidia_display && _match_wl_entry(c->settings.nvidia_display, disp)) {
825825+ if (c->settings.nvidia_display && _match_allowlist_entry(c->settings.nvidia_display, disp)) {
826826 free(display_props);
827827 return true;
828828 }
829829 }
830830831831- COMP_ERROR(c, "NVIDIA: No whitelisted displays found!");
831831+ COMP_ERROR(c, "NVIDIA: No allowlisted displays found!");
832832833833- COMP_ERROR(c, "== Current Whitelist ==");
834834- for (uint32_t i = 0; i < ARRAY_SIZE(NV_DIRECT_WHITELIST); i++)
835835- COMP_ERROR(c, "%s", NV_DIRECT_WHITELIST[i]);
833833+ COMP_ERROR(c, "== Current Allowlist ==");
834834+ for (uint32_t i = 0; i < ARRAY_SIZE(NV_DIRECT_ALLOWLIST); i++)
835835+ COMP_ERROR(c, "%s", NV_DIRECT_ALLOWLIST[i]);
836836837837 COMP_ERROR(c, "== Found Displays ==");
838838 for (uint32_t i = 0; i < display_count; i++)
+1-1
src/xrt/compositor/main/comp_settings.h
···2727 * be careful about which displays we attempt to acquire.
2828 * We may wish to allow user configuration to extend this list.
2929 */
3030-XRT_MAYBE_UNUSED static const char *NV_DIRECT_WHITELIST[] = {
3030+XRT_MAYBE_UNUSED static const char *NV_DIRECT_ALLOWLIST[] = {
3131 "Sony SIE HMD *08", "HTC Corporation HTC-VIVE",
3232 "HTC Corporation VIVE Pro", "Oculus VR Inc. Rift", /* Matches DK1, DK2 and CV1 */
3333 "Valve Corporation Index HMD",
+1-2
src/xrt/compositor/main/comp_target_swapchain.c
···631631 cts->preferred.color_space = color_space;
632632633633634634- // Sanity check.
634634+ // Preliminary check of the environment
635635 ret = vk->vkGetPhysicalDeviceSurfaceSupportKHR( //
636636 vk->physical_device, // physicalDevice
637637 vk->queue_family_index, // queueFamilyIndex
···643643 COMP_ERROR(ct->c, "vkGetPhysicalDeviceSurfaceSupportKHR: Surface not supported!");
644644 }
645645646646- // More sanity checks.
647646 if (!check_surface_present_mode(cts, cts->surface.handle, cts->present_mode)) {
648647 // Free old.
649648 destroy_old(cts, old_swapchain_handle);
···144144 if (strncmp(wl_entry, disp->displayName, wl_entry_length) != 0)
145145 return false;
146146147147- // we have a match with this whitelist entry.
147147+ // we have a match with this allowlist entry.
148148 w->base.base.c->settings.preferred.width = disp->physicalResolution.width;
149149 w->base.base.c->settings.preferred.height = disp->physicalResolution.height;
150150 struct comp_window_direct_nvidia_display d = {.name = U_TYPED_ARRAY_CALLOC(char, disp_entry_length + 1),
···172172 struct comp_window_direct_nvidia *w_direct = (struct comp_window_direct_nvidia *)ct;
173173 struct vk_bundle *vk = get_vk(ct);
174174175175- // Sanity check.
176175 if (vk->instance == VK_NULL_HANDLE) {
177176 COMP_ERROR(ct->c, "Vulkan not initialized before NVIDIA init!");
178177 return false;
···183182 return false;
184183 }
185184186186- // find our display using nvidia whitelist, enumerate its modes, and
185185+ // find our display using nvidia allowlist, enumerate its modes, and
187186 // pick the best one get a list of attached displays
188187 uint32_t display_count;
189188 if (vk->vkGetPhysicalDeviceDisplayPropertiesKHR(vk->physical_device, &display_count, NULL) != VK_SUCCESS) {
···205204 return false;
206205 }
207206208208- // TODO: what if we have multiple whitelisted HMD displays connected?
207207+ /// @todo what if we have multiple allowlisted HMD displays connected?
209208 for (uint32_t i = 0; i < display_count; i++) {
210209 struct VkDisplayPropertiesKHR disp = *(display_props + i);
211210···213212 append_nvidia_entry_on_match(w_direct, ct->c->settings.nvidia_display, &disp);
214213 }
215214216216- // check this display against our whitelist
217217- for (uint32_t j = 0; j < ARRAY_SIZE(NV_DIRECT_WHITELIST); j++)
218218- if (append_nvidia_entry_on_match(w_direct, NV_DIRECT_WHITELIST[j], &disp))
215215+ // check this display against our allowlist
216216+ for (uint32_t j = 0; j < ARRAY_SIZE(NV_DIRECT_ALLOWLIST); j++)
217217+ if (append_nvidia_entry_on_match(w_direct, NV_DIRECT_ALLOWLIST[j], &disp))
219218 break;
220219 }
221220