blob: 841e9110dbc0518a2f1416cec949b006d98a775b [file]
# Copyright 2026 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
load("//build/bazel/rules/cc:fx_cc_library.bzl", "fx_cc_library")
load("//build/bazel/rules/rust:rustc_library.bzl", "rustc_library")
package(default_applicable_licenses = ["//:license"])
rustc_library(
name = "gpu",
srcs = [
"device.rs",
"lib.rs",
],
crate_name = "starnix_modules_gpu",
crate_root = "lib.rs",
edition = "2024",
link_deps = [":gfxstream_stubs"],
lint_config = "//src/starnix/build:kernel_library_config",
visibility = ["//src/starnix/modules:__subpackages__"],
deps = [
"//src/starnix/kernel/core",
"//src/starnix/lib/starnix_logging",
"//src/starnix/lib/starnix_uapi",
"//third_party/rust_crates/vendor:rutabaga_gfx",
],
)
fx_cc_library(
name = "gfxstream_stubs",
srcs = ["gfxstream_stubs.cc"],
# GN finds the header through the source root include directory.
deps = ["//third_party/gfxstream:virtio_gpu_renderer_headers"], # @bazel2gn:skip
alwayslink = True,
)