mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 16:20:39 +02:00
gfxstream: Move virtgpu_gfxstream_protocols.h to the common location for
house protocols - Remove some duplicate definitions (replaced with virgl_hw.h include, which is also represented in gfxstream host code) - Also removed the capset_ids from virtgpu_gfxstream_protocol.h. They aren't needed to build guest-side driver, and are planned to be merged to virtgpu_drm.h Reviewed-By: Gurchetan Singh <gurchetansingh@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34116>
This commit is contained in:
parent
98a5acf352
commit
121d163b21
8 changed files with 8 additions and 39 deletions
|
|
@ -13,7 +13,6 @@
|
|||
#include "VirtGpu.h"
|
||||
#include "util/log.h"
|
||||
#include "util/perf/cpu_trace.h"
|
||||
#include "virtgpu_gfxstream_protocol.h"
|
||||
|
||||
static const size_t kReadSize = 512 * 1024;
|
||||
static const size_t kWriteOffset = kReadSize;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "VirtGpu.h"
|
||||
#include "util/log.h"
|
||||
#include "virtio/virtio-gpu/virgl_hw.h"
|
||||
|
||||
static const size_t kTransferBufferSize = (1048576);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,25 +8,7 @@
|
|||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include "virtgpu_gfxstream_protocol.h"
|
||||
|
||||
// See virgl_hw.h and p_defines.h
|
||||
#define VIRGL_FORMAT_B8G8R8A8_UNORM 1
|
||||
#define VIRGL_FORMAT_B5G6R5_UNORM 7
|
||||
#define VIRGL_FORMAT_R10G10B10A2_UNORM 8
|
||||
#define VIRGL_FORMAT_R8_UNORM 64
|
||||
#define VIRGL_FORMAT_R8G8B8_UNORM 66
|
||||
#define VIRGL_FORMAT_R8G8B8A8_UNORM 67
|
||||
#define VIRGL_FORMAT_R16G16B16A16_FLOAT 94
|
||||
#define VIRGL_FORMAT_YV12 163
|
||||
#define VIRGL_FORMAT_YV16 164
|
||||
#define VIRGL_FORMAT_IYUV 165
|
||||
#define VIRGL_FORMAT_NV12 166
|
||||
#define VIRGL_FORMAT_NV21 167
|
||||
|
||||
#define VIRGL_BIND_RENDER_TARGET (1 << 1)
|
||||
#define VIRGL_BIND_CUSTOM (1 << 17)
|
||||
#define VIRGL_BIND_LINEAR (1 << 22)
|
||||
#include "virtio/virtio-gpu/virtgpu_gfxstream_protocol.h"
|
||||
|
||||
#define PIPE_BUFFER 0
|
||||
#define PIPE_TEXTURE_2D 2
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include "VirtGpuKumquat.h"
|
||||
#include "util/log.h"
|
||||
#include "virtgpu_gfxstream_protocol.h"
|
||||
|
||||
#define PARAM(x) \
|
||||
(struct VirtGpuParam) { x, #x, 0 }
|
||||
|
|
@ -86,11 +85,11 @@ VirtGpuKumquatDevice::VirtGpuKumquatDevice(enum VirtGpuCapset capset, int32_t de
|
|||
get_caps.addr = (unsigned long long)&mCaps.magmaCapset;
|
||||
break;
|
||||
case kCapsetGfxStreamGles:
|
||||
get_caps.size = sizeof(struct vulkanCapset);
|
||||
get_caps.size = sizeof(struct glesCapset);
|
||||
get_caps.addr = (unsigned long long)&mCaps.glesCapset;
|
||||
break;
|
||||
case kCapsetGfxStreamComposer:
|
||||
get_caps.size = sizeof(struct vulkanCapset);
|
||||
get_caps.size = sizeof(struct composerCapset);
|
||||
get_caps.addr = (unsigned long long)&mCaps.composerCapset;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
#include "LinuxVirtGpu.h"
|
||||
#include "drm-uapi/virtgpu_drm.h"
|
||||
#include "util/log.h"
|
||||
#include "virtgpu_gfxstream_protocol.h"
|
||||
|
||||
#ifdef MAJOR_IN_MKDEV
|
||||
#include <sys/mkdev.h>
|
||||
|
|
@ -196,11 +195,11 @@ LinuxVirtGpuDevice::LinuxVirtGpuDevice(enum VirtGpuCapset capset, int32_t descri
|
|||
get_caps.addr = (unsigned long long)&mCaps.magmaCapset;
|
||||
break;
|
||||
case kCapsetGfxStreamGles:
|
||||
get_caps.size = sizeof(struct vulkanCapset);
|
||||
get_caps.size = sizeof(struct glesCapset);
|
||||
get_caps.addr = (unsigned long long)&mCaps.glesCapset;
|
||||
break;
|
||||
case kCapsetGfxStreamComposer:
|
||||
get_caps.size = sizeof(struct vulkanCapset);
|
||||
get_caps.size = sizeof(struct composerCapset);
|
||||
get_caps.addr = (unsigned long long)&mCaps.composerCapset;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ libgfxstream_vk_stubs = static_library(
|
|||
files_libgfxstream_vk_stubs,
|
||||
cpp_args: gfxstream_guest_args,
|
||||
include_directories: [inc_connection_manager, inc_platform_virtgpu,
|
||||
inc_guest_iostream],
|
||||
inc_guest_iostream, inc_src],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
#include "goldfish_vk_private_defs.h"
|
||||
#include "util/anon_file.h"
|
||||
#include "util/macros.h"
|
||||
#include "virtgpu_gfxstream_protocol.h"
|
||||
#include "vulkan/vulkan_core.h"
|
||||
#include "util/detect_os.h"
|
||||
#include "virtio/virtio-gpu/virgl_hw.h"
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#include "vk_format_info.h"
|
||||
|
|
|
|||
|
|
@ -8,17 +8,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
// See definitions in rutabaga_gfx_ffi.h
|
||||
#define VIRTGPU_CAPSET_VIRGL 1
|
||||
#define VIRTGPU_CAPSET_VIRGL2 2
|
||||
#define VIRTGPU_CAPSET_GFXSTREAM_VULKAN 3
|
||||
#define VIRTGPU_CAPSET_VENUS 4
|
||||
#define VIRTGPU_CAPSET_CROSS_DOMAIN 5
|
||||
#define VIRTGPU_CAPSET_DRM 6
|
||||
#define VIRTGPU_CAPSET_GFXSTREAM_MAGMA 7
|
||||
#define VIRTGPU_CAPSET_GFXSTREAM_GLES 8
|
||||
#define VIRTGPU_CAPSET_GFXSTREAM_COMPOSER 9
|
||||
|
||||
// Address Space Graphics contexts
|
||||
#define GFXSTREAM_CONTEXT_CREATE 0x1001
|
||||
#define GFXSTREAM_CONTEXT_PING 0x1002
|
||||
Loading…
Add table
Reference in a new issue