Skip to content

Commit de9121e

Browse files
committed
Use arch agnostic bin/graphics_detector
Equivalent ag/34111853 #910 added the graphics detector to the github package. Then #1177 added symlinks to not break the internal build prior to ag/34111853. After ag/34111853, internal build started to use the general binary. However, this was missing from the github package which made ag/35919528 start to reference the old file names. Bug: b/466394895
1 parent 006c7a8 commit de9121e

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

base/cvd/cuttlefish/host/commands/assemble_cvd/graphics_flags.cc

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -397,20 +397,6 @@ Result<GuestRendererPreload> SelectGuestRendererPreload(
397397

398398
#endif
399399

400-
Result<std::string> GraphicsDetectorBinaryPath() {
401-
const auto host_arch = HostArch();
402-
switch (host_arch) {
403-
case Arch::Arm64:
404-
return HostBinaryPath("aarch64-linux-gnu/gfxstream_graphics_detector");
405-
case Arch::X86:
406-
case Arch::X86_64:
407-
return HostBinaryPath("x86_64-linux-gnu/gfxstream_graphics_detector");
408-
default:
409-
break;
410-
}
411-
return CF_ERR("Graphics detector unavailable for host arch.");
412-
}
413-
414400
bool IsAmdGpu(const gfxstream::proto::GraphicsAvailability& availability) {
415401
return (availability.has_egl() &&
416402
((availability.egl().has_gles2_availability() &&
@@ -539,18 +525,9 @@ GetGraphicsAvailabilityWithSubprocessCheck() {
539525
#ifdef __APPLE__
540526
return {};
541527
#else
542-
auto graphics_detector_binary_result = GraphicsDetectorBinaryPath();
543-
if (!graphics_detector_binary_result.ok()) {
544-
LOG(ERROR) << "Failed to run graphics detector, graphics detector path "
545-
<< " not available: \n"
546-
<< graphics_detector_binary_result.error().FormatForEnv()
547-
<< ". Assuming no availability.";
548-
return {};
549-
}
550-
551528
TemporaryFile graphics_availability_file;
552529

553-
Command graphics_detector_cmd(graphics_detector_binary_result.value());
530+
Command graphics_detector_cmd(HostBinaryPath("graphics_detector"));
554531
graphics_detector_cmd.AddParameter(graphics_availability_file.path);
555532

556533
Result<std::string> graphics_detector_stdout =

0 commit comments

Comments
 (0)