tenclass / mvisor-win-vgpu-driver

Implementation of OpenGL on windows guest virtual machine using Mesa/Virgl protocol.
GNU General Public License v3.0
114 stars 21 forks source link

Failed to compile mvisor-win-vgpu-driver. #3

Closed Horst-lgtm closed 10 months ago

Horst-lgtm commented 10 months ago

Hi team, I'd like to compile vgpu-driver by myself. I built driver with command build.bat C:\mvisor-win-vgpu-driver\usermode. But it failed with: C:\mvisor-win-vgpu-driver\usermode\mesa\src\gallium\winsys\virgl\drm\virgl_drm_winsys.h(82): error C2099: initializer is not a constant

Here is my env info: python 3.12.0 Microsoft Visual Studio Community 2019 16.11.31 cmake version 3.28.0-rc3 meson 1.2.3

Are there any suggestions?

Thx.

nooodles2023 commented 10 months ago

It's just a compiler error, which compiler did you use, MSVC or GCC?

#define PARAM(x) (struct param) { x, #x, 0 }

struct param params[] = { PARAM(VIRTGPU_PARAM_3D_FEATURES),
                          PARAM(VIRTGPU_PARAM_CAPSET_QUERY_FIX),
                          PARAM(VIRTGPU_PARAM_RESOURCE_BLOB),
                          PARAM(VIRTGPU_PARAM_HOST_VISIBLE),
                          PARAM(VIRTGPU_PARAM_CROSS_DEVICE),
                          PARAM(VIRTGPU_PARAM_CONTEXT_INIT),
                          PARAM(VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs)
};

Maybe you could try to compile this part on your own env .

Horst-lgtm commented 10 months ago

It is clang, should I use MSVC or GCC? Could you share your compiler version information?

nooodles2023 commented 10 months ago

It is clang, should I use MSVC or GCC? Could you share your compiler version information?

gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0

Horst-lgtm commented 10 months ago

It is clang, should I use MSVC or GCC? Could you share your compiler version information?

gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0

Cool, it worked well. Thx a lot.