cschied / q2vkpt

Real-time path tracer VKPT integrated into q2pro Quake 2 client.
http://brechpunkt.de/q2vkpt
GNU General Public License v2.0
946 stars 76 forks source link

another build issue (possibly cmake isnt inlcuding open gl properly) #23

Closed Mcilie closed 5 years ago

Mcilie commented 5 years ago

Hi, back again with another build issue. I fixed my .config file (changed it to use libsdl 2 as recommended in another issue) and when i sudo make -j 4 i get: [CC] .q2pro/src/refresh/vkpt/textures.o [CC] .q2pro/src/refresh/vkpt/main.o [CC] .q2pro/src/refresh/vkpt/matrix.o [CC] .q2pro/src/refresh/vkpt/draw.o [CC] .q2pro/src/refresh/vkpt/models.o [CC] .q2pro/src/refresh/vkpt/path_tracer.o [CC] .q2pro/src/refresh/vkpt/vk_util.o [CC] .q2pro/src/refresh/vkpt/bsp_mesh.o [CC] .q2pro/src/refresh/vkpt/uniform_buffer.o [CC] .q2pro/src/refresh/vkpt/vertex_buffer.o src/refresh/vkpt/textures.c: In function ‘IMG_Load’: src/refresh/vkpt/textures.c:496:6: warning: unused variable ‘level’ [-Wunused-variable] int level = 0; ^~~~~ In file included from src/refresh/vkpt/bsp_mesh.c:24:0: src/refresh/vkpt/../light_lists.c.h: In function ‘cluster_aabbs’: src/refresh/vkpt/../light_lists.c.h:46:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] vec3_t* aabb_min = aabbs[2 * i]; ^~~~~ src/refresh/vkpt/../light_lists.c.h:59:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] vec3_t* aabb_min = aabbs[2 * wm->clusters[i/3]]; ^~~~~ src/refresh/vkpt/../light_lists.c.h:77:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] vec3_t* aabb_min = aabbs[2 * i]; ^~~~~ [CC] .q2pro/src/refresh/vkpt/light_hierarchy.o [CC] .q2pro/src/refresh/vkpt/asvgf.o [CC] .q2pro/src/refresh/vkpt/stb.o [CC] .q2pro/src/refresh/vkpt/profiler.o [CC] .q2pro/src/unix/sdl2/video.o [CC] .q2pro/src/unix/sdl2/sound.o [GLSL] shader_vkpt/instance_geometry.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_atrous.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_gradient_img.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer_rtx.rchit.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer.rgen.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer_rtx.rmiss.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_gradient_atrous.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer.rchit.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_fwd_project.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer.rmiss.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/stretch_pic.vert.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_temporal.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_seed_rng.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer_rtx.rgen.spv [GLSL] shader_vkpt/asvgf_taa.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/stretch_pic.frag.spv /bin/sh: 1: glslangValidator: not found [CC] .baseq2/src/baseq2/m_float.o /bin/sh: 1: glslangValidator: not found [CC] .baseq2/src/baseq2/m_flyer.o [CC] .baseq2/src/baseq2/m_gladiator.o [CC] .baseq2/src/baseq2/m_gunner.o src/unix/sdl2/video.c: In function ‘VID_Init’: src/unix/sdl2/video.c:467:1: warning: label ‘fail’ defined but not used [-Wunused-label] fail: ^~~~ src/unix/sdl2/video.c:379:12: warning: unused variable ‘flags’ [-Wunused-variable] Uint32 flags = SDL_WINDOW_RESIZABLE; ^~~~~ In file included from src/unix/sdl2/video.c:35:0: At top level: src/unix/sdl2/../res/q2pro.xbm:3:22: warning: ‘q2icon_bits’ defined but not used [-Wunused-variable] static unsigned char q2icon_bits[] = { ^~~~~~~~~~~ src/refresh/vkpt/textures.c: In function ‘vkpt_create_images’: src/refresh/vkpt/textures.c:1013:8: warning: ‘memory_type_bits’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(i && mem_req.memoryTypeBits != memory_type_bits) { ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/refresh/vkpt/light_hierarchy.c: In function ‘lh_build_binned_rec’: src/refresh/vkpt/light_hierarchy.c:473:43: warning: ‘m_s’ may be used uninitialized in this function [-Wmaybe-uninitialized] lh_bin_t *a_bin[] = {&a_bins[d][0][s], &a_bins[d][1][s + 1]}; ^ src/refresh/vkpt/light_hierarchy.c:473:37: warning: ‘m_d’ may be used uninitialized in this function [-Wmaybe-uninitialized] lh_bin_t *a_bin[] = {&a_bins[d][0][s], &a_bins[d][1][s + 1]}; ^ [CC] .baseq2/src/baseq2/m_hover.o [CC] .baseq2/src/baseq2/m_infantry.o [CC] .baseq2/src/baseq2/m_insane.o [CC] .baseq2/src/baseq2/m_medic.o [CC] .baseq2/src/baseq2/m_move.o [CC] .baseq2/src/baseq2/m_mutant.o [CC] .baseq2/src/baseq2/m_parasite.o [CC] .baseq2/src/baseq2/m_soldier.o [CC] .baseq2/src/baseq2/m_supertank.o [CC] .baseq2/src/baseq2/m_tank.o [CC] .baseq2/src/baseq2/p_client.o [CC] .baseq2/src/baseq2/p_hud.o [CC] .baseq2/src/baseq2/p_trail.o [CC] .baseq2/src/baseq2/p_view.o [CC] .baseq2/src/baseq2/p_weapon.o [LD] gamex86_64.so [LD] q2vkpt .q2pro/src/client/main.o: In functionCL_Begin': /home/mcist-9013/q2vkpt/src/client/main.c:1751: undefined reference to gl_modulate_world' /home/mcist-9013/q2vkpt/src/client/main.c:1752: undefined reference togl_modulate_entities' /home/mcist-9013/q2vkpt/src/client/main.c:1753: undefined reference to gl_brightness' .q2pro/src/client/main.o: In functionCL_ClearState': /home/mcist-9013/q2vkpt/src/client/main.c:714: undefined reference to gl_modulate_world' /home/mcist-9013/q2vkpt/src/client/main.c:715: undefined reference togl_modulate_entities' /home/mcist-9013/q2vkpt/src/client/main.c:716: undefined reference to gl_brightness' .q2pro/src/client/tent.o: In functionCL_ParseTEnt': /home/mcist-9013/q2vkpt/src/client/tent.c:1010: undefined reference to R_SetRayProbe' .q2pro/src/refresh/models.o: In functionR_RegisterModel': /home/mcist-9013/q2vkpt/src/refresh/models.c:349: undefined reference to MOD_LoadMD3' collect2: error: ld returned 1 exit status Makefile:751: recipe for target 'q2vkpt' failed make: *** [q2vkpt] Error 1 thanks

Mcilie commented 5 years ago

correction: Even when I use default config file + libsdl reccommended version in the INSTALL file I get:

[GLSL] shader_vkpt/instance_geometry.comp.spv [GLSL] shader_vkpt/asvgf_gradient_img.comp.spv [GLSL] shader_vkpt/asvgf_atrous.comp.spv [GLSL] shader_vkpt/path_tracer_rtx.rchit.spv [GLSL] shader_vkpt/path_tracer_rtx.rmiss.spv [GLSL] shader_vkpt/path_tracer.rgen.spv [GLSL] shader_vkpt/asvgf_gradient_atrous.comp.spv [GLSL] shader_vkpt/path_tracer.rchit.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_fwd_project.comp.spv /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/path_tracer.rmiss.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/stretch_pic.vert.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_temporal.comp.spv /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_seed_rng.comp.spv [GLSL] shader_vkpt/path_tracer_rtx.rgen.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/asvgf_taa.comp.spv /bin/sh: 1: glslangValidator: not found [GLSL] shader_vkpt/stretch_pic.frag.spv /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found /bin/sh: 1: glslangValidator: not found [LD] q2vkpt .q2pro/src/client/main.o: In functionCL_Begin': /home/mcist-9013/q2vkpt/src/client/main.c:1751: undefined reference to gl_modulate_world' /home/mcist-9013/q2vkpt/src/client/main.c:1752: undefined reference togl_modulate_entities' /home/mcist-9013/q2vkpt/src/client/main.c:1753: undefined reference to gl_brightness' .q2pro/src/client/main.o: In functionCL_ClearState': /home/mcist-9013/q2vkpt/src/client/main.c:714: undefined reference to gl_modulate_world' /home/mcist-9013/q2vkpt/src/client/main.c:715: undefined reference togl_modulate_entities' /home/mcist-9013/q2vkpt/src/client/main.c:716: undefined reference to gl_brightness' .q2pro/src/client/tent.o: In functionCL_ParseTEnt': /home/mcist-9013/q2vkpt/src/client/tent.c:1010: undefined reference to R_SetRayProbe' .q2pro/src/refresh/models.o: In functionR_RegisterModel': /home/mcist-9013/q2vkpt/src/refresh/models.c:349: undefined reference to MOD_LoadMD3' collect2: error: ld returned 1 exit status Makefile:751: recipe for target 'q2vkpt' failed make: *** [q2vkpt] Error 1

cschied commented 5 years ago

You need to install the latest version of the vulkan SDK for compiling the shaders. Can you post your .config file? R_SetRayProbe should only be compiled in with CONFIG_GLPT_RENDERER=1, which is not part of this source release. (left over from the initital GL prototype we did)

Mcilie commented 5 years ago

`# save as .config for compiling with Make (linux)

CONFIG_PNG=1 CONFIG_JPEG=1 CONFIG_SDL2=1

use vkpt renderer

CONFIG_VKPT_RENDERER=1

enable/disable vulkan validation layer

CONFIG_VKPT_ENABLE_VALIDATION=0

q2vkpt currently does not support md3

CONFIG_NO_MD3=1

set up a custom path to the glslangValidator binary here

CONFIG_GLSLANGVALIDATOR=glslangValidator

CC=gcc`

Mcilie commented 5 years ago

I just wiped the folder then cloned the repo again now it works (compiled correctly) but i have another problem so ill put that in another issue