Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4af4014
Fix validation checks on emulated textures
kocdemir Jun 30, 2026
06d9fff
Add 64-bit unsigned integer feature type
kocdemir Jul 1, 2026
65e8404
Add VulkanMaxSafeHeapSize feature
kocdemir Jul 1, 2026
b8500aa
Add bounds check for vertex attribute buffer binding index.
kocdemir Jul 3, 2026
74cc809
Fix compilation issues on Vulkan_unittests on macOS
kocdemir Jul 3, 2026
abf6062
Merge remote-tracking branch 'goog/emu-main-dev' into main
kocdemir Jul 8, 2026
42d4f2d
Add end2end tests for Y8Cb8Cr8_420
kocdemir Jul 16, 2026
f8b48d8
Add DmaBuf external memory mode
kocdemir Jul 13, 2026
9f0a11b
Revert "Add DmaBuf external memory mode"
ikicha Jul 27, 2026
8785c03
Fix unused variable warning in gfxstream
Sharjeel-Khan Jul 30, 2026
4b083b8
Introduce ColorBuffer interface
jmacnak Jul 23, 2026
199fe22
Replace BorrowedImage with ColorBuffer interface
jmacnak Jul 24, 2026
51ffc07
Convert BackendCallbacks to a GlobalState interface
jmacnak Jul 24, 2026
1172a15
Decouple `vk_android_native_buffer_operations.cpp` from `FrameBuffer`
jmacnak Jul 24, 2026
1c7c27a
Decouple PostWorker from FrameBuffer
jmacnak Jul 24, 2026
a6e1fec
Decouple RenderThreadInfoGl from FrameBuffer
jmacnak Jul 24, 2026
4df6a7f
Separate native_sub_window* into new library
jmacnak Jul 24, 2026
6d7cf2d
Move some common headers to host/common
jmacnak Jul 24, 2026
10115ea
Remove host/gl dependency on host
jmacnak Jul 24, 2026
3cbccdb
Remove gfxstream_host_headers
jmacnak Jul 29, 2026
e33680d
Move GL handling to the GL server
jmacnak Jul 28, 2026
30c044b
Move post worker files to address backwards-ref errors
jmacnak Jul 29, 2026
87c2b82
Pass IColorBuffer to EmulationGl for some GL funcs
jmacnak Aug 3, 2026
2093a6b
Remove unused gfx_stream_backend_init_override
jmacnak Aug 3, 2026
177847d
Apply --warn-backrefs and --fatal-warnings in linkopts
jmacnak Aug 3, 2026
29ccd1f
Add "shallow" suffix to image create info field
jmacnak Aug 3, 2026
3c61690
Move lazy snapshot to host common
jmacnak Aug 4, 2026
74b7ecc
Use std::string_view in GlobalState
jmacnak Aug 3, 2026
c39616b
Add meson dep to host/common
jmacnak Aug 4, 2026
b0fe335
Fixup for native window meson build
jmacnak Aug 5, 2026
b41a1ff
Fixup for macos build
jmacnak Aug 5, 2026
9de0d34
Make warn-backrefs linux only
jmacnak Aug 5, 2026
4865d73
Drop old test debugging statement
jmacnak Aug 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions build_variables.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Common build configuration definitions.
"""

GFXSTREAM_COMMON_COPTS = [
"-Wall",
"-Wextra",
Expand All @@ -26,6 +27,7 @@ GFXSTREAM_COMMON_COPTS = [
],
"//conditions:default": [],
})

GFXSTREAM_HOST_COPTS = GFXSTREAM_COMMON_COPTS + [
] + select({
"@platforms//os:windows": [
Expand All @@ -35,6 +37,7 @@ GFXSTREAM_HOST_COPTS = GFXSTREAM_COMMON_COPTS + [
"-fno-exceptions",
],
})

GFXSTREAM_HOST_VK_DEFINES = [
"VK_GFXSTREAM_STRUCTURE_TYPE_EXT",
"VK_GOOGLE_gfxstream",
Expand All @@ -51,6 +54,7 @@ GFXSTREAM_HOST_VK_DEFINES = [
],
"//conditions:default": [],
})

GFXSTREAM_HOST_DEFINES = GFXSTREAM_HOST_VK_DEFINES + [
"BUILDING_EMUGL_COMMON_SHARED",
"EMUGL_BUILD",
Expand Down Expand Up @@ -78,3 +82,12 @@ GFXSTREAM_HOST_DEFINES = GFXSTREAM_HOST_VK_DEFINES + [
],
"//conditions:default": [],
})

GFXSTREAM_HOST_LINKOPTS = select({
"@platforms//os:linux": [
"-Wl,--warn-backrefs",
"-Wl,--warn-backrefs-exclude=*llvm*",
"-Wl,--fatal-warnings",
],
"//conditions:default": [],
})
18 changes: 7 additions & 11 deletions host/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ cc_library_host_static {

gfxstream_backend_static_deps = [
"libgfxstream_common_base",
"libgfxstream_common_logging",
"libgfxstream_common_utils",
"libgfxstream_etc",
"libgfxstream_glestranslator_egl",
"libgfxstream_glestranslator_glescm",
"libgfxstream_glestranslator_glesv2",
"libgfxstream_host_address_space",
"libgfxstream_host_compressedtextures",
"libgfxstream_host_decoder_common",
"libgfxstream_host_common",
"libgfxstream_host_compressedtextures",
"libgfxstream_host_compressedtextures",
"libgfxstream_host_decoder_common",
"libgfxstream_host_features",
"libgfxstream_host_gl_server",
"libgfxstream_host_gles1_dec",
Expand All @@ -63,11 +64,10 @@ gfxstream_backend_static_deps = [
"libgfxstream_host_glsnapshot",
"libgfxstream_host_iostream",
"libgfxstream_host_library",
"libgfxstream_common_logging",
"libgfxstream_host_native_window",
"libgfxstream_host_openglesdispatch",
"libgfxstream_host_rendercontrol_dec",
"libgfxstream_host_renderdoc",
"libgfxstream_host_snapshot",
"libgfxstream_host_tracing",
"libgfxstream_host_vulkan_cereal",
"libgfxstream_host_vulkan_emulatedtextures",
Expand Down Expand Up @@ -115,11 +115,12 @@ cc_defaults {
"libgfxstream_host_decoder_common",
"libgfxstream_host_features",
"libgfxstream_host_renderdoc",
"libgfxstream_host_snapshot",
"libgfxstream_host_tracing",
"libgfxstream_host_gles2_dec",
"libgfxstream_host_glsnapshot",
"libgfxstream_host_address_space",
"libgfxstream_host_vulkan_cereal",
"libgfxstream_host_native_window",
],
shared_libs: [
"liblog", // gfxstream_base uses this via perfetto-libperfettobase
Expand All @@ -132,9 +133,6 @@ cc_defaults {
"channel_stream.cpp",
"color_buffer.cpp",
"frame_buffer.cpp",
"hwc2.cpp",
"post_worker.cpp",
"post_worker_gl.cpp",
"read_buffer.cpp",
"render_api.cpp",
"render_channel_impl.cpp",
Expand All @@ -160,12 +158,10 @@ cc_defaults {
],
target: {
host: {
srcs: ["native_sub_window_x11.cpp"],
static_libs: gfxstream_backend_snapshot_static_deps,
whole_static_libs: gfxstream_backend_snapshot_static_deps,
},
android: {
srcs: ["native_sub_window_android.cpp"],
shared_libs: [
"libnativewindow",
],
Expand Down Expand Up @@ -198,9 +194,9 @@ cc_test_host {
"libgfxstream_common_image",
"libgfxstream_common_logging",
"libgfxstream_common_testenv",
"libgfxstream_host_snapshot",
"libgfxstream_host_test_support",
"libgfxstream_host_vulkan_server",
"libgfxstream_host_address_space",
"libgfxstream_oswindow_test_support",
"libgmock",
],
Expand Down
118 changes: 15 additions & 103 deletions host/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library")
load("//:build_variables.bzl", "GFXSTREAM_HOST_COPTS", "GFXSTREAM_HOST_DEFINES")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load("//:build_variables.bzl", "GFXSTREAM_HOST_COPTS", "GFXSTREAM_HOST_DEFINES", "GFXSTREAM_HOST_LINKOPTS")

package(
default_applicable_licenses = ["//:gfxstream_license"],
Expand Down Expand Up @@ -56,86 +56,23 @@ cc_library(
defines = GFXSTREAM_HOST_DEFINES,
features = ["-parse_headers"],
includes = ["include"],
linkopts = GFXSTREAM_HOST_LINKOPTS,
visibility = ["//visibility:public"],
deps = [
"//host/features:gfxstream_host_features",
],
)

cc_library(
name = "gfxstream_host_headers",
hdrs = [
"buffer.h",
"color_buffer.h",
"compositor.h",
"frame_buffer.h",
"framework_formats.h",
"gles_compat.h",
"handle.h",
"hwc2.h",
"native_sub_window.h",
"post_commands.h",
"post_worker.h",
"readback_worker.h",
"stale_ptr_registry.h",
"vsync_thread.h",
],
copts = GFXSTREAM_HOST_COPTS,
defines = GFXSTREAM_HOST_DEFINES,
includes = ["."],
deps = [
":gfxstream_backend_headers",
"//common/base:gfxstream_common_base",
"//common/logging:gfxstream_common_logging",
"//host/common:gfxstream_host_common",
"//host/features:gfxstream_host_features",
"//host/snapshot:gfxstream_host_snapshot",
"//third_party/opengl:gfxstream_egl_headers",
"//third_party/opengl:gfxstream_gles2_headers",
"//third_party/opengl:gfxstream_gles3_headers",
"//third_party/vulkan:gfxstream_vulkan_headers",
"//third_party/xcb",
],
)

objc_library(
name = "gfxstream_backend_static-darwin",
srcs = [
"gles_compat.h",
"native_sub_window.h",
"native_sub_window_cocoa.mm",
],
copts = GFXSTREAM_HOST_COPTS + [
"-Wno-deprecated-declarations",
# These sources use manual reference counting, so disable ARC which
# objc_library enables by default.
"-fno-objc-arc",
],
defines = GFXSTREAM_HOST_DEFINES,
sdk_frameworks = [
"AppKit",
"QuartzCore",
"IOSurface",
],
target_compatible_with = [
"@platforms//os:macos",
],
deps = [
":gfxstream_backend_headers",
"//third_party/opengl:gfxstream_egl_headers",
],
)

cc_library(
name = "gfxstream_backend_static",
srcs = [
"buffer.cpp",
"buffer.h",
"channel_stream.cpp",
"channel_stream.h",
"color_buffer.cpp",
"color_buffer.h",
"frame_buffer.cpp",
"hwc2.cpp",
"post_worker.cpp",
"post_worker_gl.cpp",
"read_buffer.cpp",
"render_channel_impl.cpp",
"render_control.cpp",
Expand All @@ -153,32 +90,11 @@ cc_library(
"virtio_gpu_ring_blob.cpp",
"virtio_gpu_timelines.cpp",
"vsync_thread.cpp",
] + select({
"@platforms//os:macos": [],
"@platforms//os:windows": [
"native_sub_window_win32.cpp",
],
"@platforms//os:linux": [
"native_sub_window_x11.cpp",
],
"//conditions:default": [],
}),
],
hdrs = [
"buffer.h",
"channel_stream.h",
"color_buffer.h",
"compositor.h",
"frame_buffer.h",
"framework_formats.h",
"gles_compat.h",
"handle.h",
"hwc2.h",
"native_sub_window.h",
"post_commands.h",
"post_worker.h",
"post_worker_gl.h",
"read_buffer.h",
"readback_worker.h",
"render_channel_impl.h",
"render_control.h",
"render_lib_impl.h",
Expand All @@ -187,7 +103,6 @@ cc_library(
"render_window.h",
"renderer_impl.h",
"ring_stream.h",
"stale_ptr_registry.h",
"sync_thread.h",
"virtgpu_gfxstream_protocol.h",
"virtio_gpu.h",
Expand All @@ -208,14 +123,13 @@ cc_library(
defines = GFXSTREAM_HOST_DEFINES + ["QEMU_NEXT"],
includes = [
".",
"gl",
],
linkopts = GFXSTREAM_HOST_LINKOPTS,
linkstatic = True,
visibility = ["//visibility:public"],
deps = [
":gfxstream_backend_cc_proto",
":gfxstream_backend_headers",
":gfxstream_host_headers",
"//common/base:gfxstream_common_base",
"//common/logging:gfxstream_common_logging",
"//host/address_space:gfxstream_host_address_space",
Expand All @@ -233,9 +147,9 @@ cc_library(
"//host/gl/glestranslator/gles_cm:gles_cm_translator_static",
"//host/iostream:gfxstream_host_iostream",
"//host/library:gfxstream_host_library",
"//host/native_window:gfxstream_host_native_window",
"//host/renderControl_dec",
"//host/renderdoc:gfxstream_host_renderdoc",
"//host/snapshot:gfxstream_host_snapshot",
"//host/tracing:gfxstream_host_tracing",
"//host/vulkan:gfxstream_vulkan_server",
"//third_party/drm:gfxstream_drm_headers",
Expand All @@ -246,12 +160,7 @@ cc_library(
"//third_party/xcb",
"@protobuf",
"@protobuf//src/google/protobuf/io",
] + select({
"@platforms//os:macos": [
":gfxstream_backend_static-darwin",
],
"//conditions:default": [],
}),
],
)

cc_library(
Expand All @@ -265,13 +174,13 @@ cc_library(
"-Wno-return-type-c-linkage",
],
defines = GFXSTREAM_HOST_DEFINES,
linkopts = GFXSTREAM_HOST_LINKOPTS,
linkstatic = True,
visibility = ["//visibility:public"],
deps = [
":gfxstream_backend_cc_proto",
":gfxstream_backend_headers",
":gfxstream_backend_static",
":gfxstream_host_headers",
"//common/base:gfxstream_common_base",
"//common/logging:gfxstream_common_logging",
"//common/utils:gfxstream_common_utils",
Expand All @@ -290,13 +199,13 @@ cc_binary(
],
copts = GFXSTREAM_HOST_COPTS,
defines = GFXSTREAM_HOST_DEFINES,
linkopts = GFXSTREAM_HOST_LINKOPTS,
linkshared = True,
visibility = ["//visibility:public"],
deps = [
":gfxstream_backend_cc_proto",
":gfxstream_backend_headers",
":gfxstream_backend_static",
":gfxstream_host_headers",
"//common/base:gfxstream_common_base",
"//common/logging:gfxstream_common_logging",
"//common/utils:gfxstream_common_utils",
Expand All @@ -313,12 +222,14 @@ cc_test(
"frame_buffer_unittest.cpp",
],
copts = GFXSTREAM_HOST_COPTS,
linkopts = GFXSTREAM_HOST_LINKOPTS,
deps = [
":gfxstream_backend_static",
"//common/base:gfxstream_common_base",
"//common/testenv:graphics_test_environment_support",
"//host/common:gfxstream_host_common",
"//host/features:gfxstream_host_features",
"//host/gl:gfxstream_opengl_server",
"//host/testlibs/oswindow:gfxstream_oswindow_test_support",
"//host/testlibs/support:gfxstream_host_testing_support",
"@com_google_googletest//:gtest",
Expand All @@ -332,6 +243,7 @@ cc_test(
"vsync_thread_unittest.cpp",
],
copts = GFXSTREAM_HOST_COPTS,
linkopts = GFXSTREAM_HOST_LINKOPTS,
deps = [
":gfxstream_backend_static",
"//host/testlibs/support:gfxstream_host_testing_support",
Expand Down
Loading
Loading