Fixed issues with telemetry.
This commit is contained in:
@@ -29,8 +29,11 @@ _VULKAN_MANIFEST_DIRECTORIES = (
|
||||
)
|
||||
_LIBRARY_ROOTS = (
|
||||
Path("/lib"),
|
||||
Path("/lib32"),
|
||||
Path("/usr/lib"),
|
||||
Path("/usr/lib32"),
|
||||
Path("/usr/local/lib"),
|
||||
Path("/usr/local/lib32"),
|
||||
)
|
||||
_PCI_DATABASES = (
|
||||
Path("/usr/share/hwdata/pci.ids"),
|
||||
@@ -198,13 +201,12 @@ def _vulkan_info(
|
||||
if api_version and _VERSION_PATTERN.fullmatch(api_version):
|
||||
api_versions.append(api_version)
|
||||
library = _short_string(icd.get("library_path"))
|
||||
architecture = _manifest_library_architecture(
|
||||
architectures = _manifest_library_architectures(
|
||||
manifest,
|
||||
library,
|
||||
library_roots,
|
||||
)
|
||||
if architecture is not None:
|
||||
manifest_architectures.add(architecture)
|
||||
manifest_architectures.update(architectures)
|
||||
|
||||
vulkaninfo = shutil.which("vulkaninfo", path=environment.get("PATH", ""))
|
||||
probe = (
|
||||
@@ -240,6 +242,11 @@ def _vulkan_info(
|
||||
"vulkan_available": available_64bit,
|
||||
"vulkan_64bit": available_64bit,
|
||||
"vulkan_32bit": available_32bit,
|
||||
"vulkan_64bit_loader_available": 64 in loader_architectures,
|
||||
"vulkan_64bit_icd_available": 64 in manifest_architectures,
|
||||
"vulkan_64bit_probe_succeeded": functional_64bit,
|
||||
"vulkan_32bit_loader_available": 32 in loader_architectures,
|
||||
"vulkan_32bit_icd_available": 32 in manifest_architectures,
|
||||
"vulkan_64bit_detection": (
|
||||
"vulkaninfo" if functional_64bit else "loader_and_icd"
|
||||
),
|
||||
@@ -860,17 +867,18 @@ def _vulkan_loader_architectures(library_roots: Sequence[Path]) -> set[int]:
|
||||
return architectures
|
||||
|
||||
|
||||
def _manifest_library_architecture(
|
||||
def _manifest_library_architectures(
|
||||
manifest: Path,
|
||||
library: str | None,
|
||||
library_roots: Sequence[Path],
|
||||
) -> int | None:
|
||||
) -> set[int]:
|
||||
architectures: set[int] = set()
|
||||
if library:
|
||||
path = Path(library)
|
||||
if path.is_absolute():
|
||||
architecture = _elf_architecture(path)
|
||||
if architecture is not None:
|
||||
return architecture
|
||||
architectures.add(architecture)
|
||||
else:
|
||||
candidates = [manifest.parent / path]
|
||||
for root in library_roots:
|
||||
@@ -878,13 +886,15 @@ def _manifest_library_architecture(
|
||||
for candidate in candidates:
|
||||
architecture = _elf_architecture(candidate)
|
||||
if architecture is not None:
|
||||
return architecture
|
||||
architectures.add(architecture)
|
||||
if architectures:
|
||||
return architectures
|
||||
lowered = manifest.name.casefold()
|
||||
if any(token in lowered for token in ("i386", "i486", "i586", "i686", "x86_32")):
|
||||
return 32
|
||||
return {32}
|
||||
if any(token in lowered for token in ("x86_64", "amd64")):
|
||||
return 64
|
||||
return None
|
||||
return {64}
|
||||
return set()
|
||||
|
||||
|
||||
def _library_candidates(root: Path, prefix: str) -> tuple[Path, ...]:
|
||||
|
||||
Reference in New Issue
Block a user