HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.85k stars 194 forks source link

Compiling VKD3D tests with VS2022 fails.. #1952

Open oscarbg opened 6 months ago

oscarbg commented 6 months ago

Hi, using latest:

meson 1.4 cl:

Compilador de optimización de C/C++ de Microsoft (R) versión 19.39.33523 para x64

seems a minor issue:

../tests/d3d12_shaders.c(2594): error C2099: el inicializador no es una constante

[3/4] Compiling C object tests/d3d12.exe.p/d3d12_shaders.c.obj
FAILED: tests/d3d12.exe.p/d3d12_shaders.c.obj
"cl" "-Itests\d3d12.exe.p" "-Itests" "-I..\tests" "-I..\include\private" "-Iinclude" "-I..\include" "-I..\khronos\Vulkan-Headers\include" "-I..\khronos\SPIRV-Headers\include" "-Ilibs\vkd3d-common\libvkd3d_common.a.p" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W3" "/std:c11" "/O2" "/Gw" "-D_GNU_SOURCE" "-DPACKAGE_VERSION=\"2.12\"" "-D_WIN32_WINNT=0x600" "-DVKD3D_NO_TRACE_MESSAGES" "/wd4244" "/wd4101" "/wd4267" "/wd4996" "/wd4334" "/wd4146" "/wd4305" "/Fdtests\d3d12.exe.p\d3d12_shaders.c.pdb" /Fotests/d3d12.exe.p/d3d12_shaders.c.obj "/c" ../tests/d3d12_shaders.c
../tests/d3d12_shaders.c(2594): error C2099: el inicializador no es una constante
ninja: build stopped: subcommand failed.

FIX: file seems autogenerated so I changed "static const struct" with "struct" in line 2576 just following line:

static struct named_shader ps_dmodifier = {"dmodifier", ps_dmodifier_code, sizeof(ps_dmodifier_code)};

thanks..