Commit graph

2792 commits

Author SHA1 Message Date
Denis Pauk
a701226a19 cppcheck fixes
vk_common.c:1618:19: style: The if condition is the same as the previous if condition [duplicateCondition]
vk_draw.c:93:7: style: The scope of the variable 'fullname' can be reduced. [variableScope]
vk_draw.c:273:9: style: The scope of the variable 'source' can be reduced. [variableScope]
vk_draw.c:274:8: style: The scope of the variable 'frac' can be reduced. [variableScope]
vk_draw.c:274:14: style: The scope of the variable 'fracstep' can be reduced. [variableScope]
vk_draw.c:276:8: style: The scope of the variable 'row' can be reduced. [variableScope]
vk_draw.c:295:12: style: The scope of the variable 'dest' can be reduced. [variableScope]
vk_draw.c:111:45: style:inconclusive: Function 'Draw_GetPicSize' argument 3 names different: declaration 'name' definition 'pic'. [funcArgNamesDifferent]
vk_draw.c:131:57: style:inconclusive: Function 'Draw_StretchPic' argument 5 names different: declaration 'name' definition 'pic'. [funcArgNamesDifferent]
vk_draw.c:159:53: style:inconclusive: Function 'Draw_PicScaled' argument 4 names different: declaration 'factor' definition 'scale'. [funcArgNamesDifferent]
vk_draw.c:185:56: style:inconclusive: Function 'Draw_TileClear' argument 5 names different: declaration 'name' definition 'pic'. [funcArgNamesDifferent]
vk_image.c:586:7: style: The scope of the variable 'best' can be reduced. [variableScope]
vk_image.c:1170:8: style: The scope of the variable 'p' can be reduced. [variableScope]
vk_image.c:1591:7: style: The scope of the variable 'r' can be reduced. [variableScope]
vk_image.c:1591:10: style: The scope of the variable 'g' can be reduced. [variableScope]
vk_image.c:1591:13: style: The scope of the variable 'b' can be reduced. [variableScope]
vk_image.c:1592:11: style: The scope of the variable 'v' can be reduced. [variableScope]
vk_image.c:1628:9: style: The scope of the variable 'j' can be reduced. [variableScope]
vk_image.c:1261:8: style: Local variable 'i' shadows outer variable [shadowVariable]
vk_light.c:231:18: warning: Identical condition '(back<0)==side', second condition is always false [identicalConditionAfterEarlyExit]
vk_light.c:40:8: style: The scope of the variable 'a' can be reduced. [variableScope]
vk_light.c:306:9: style: The scope of the variable 'add' can be reduced. [variableScope]
vk_mesh.c:107:7: style: The scope of the variable 'count' can be reduced. [variableScope]
vk_mesh.c:316:7: style: The scope of the variable 'count' can be reduced. [variableScope]
vk_mesh.c:317:7: style: The scope of the variable 'i' can be reduced. [variableScope]
vk_mesh.c:647:9: style: The scope of the variable 'min' can be reduced. [variableScope]
vk_mesh.c:766:9: style: Local variable 'model' shadows outer variable [shadowVariable]
vk_mesh.c:267:52: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
vk_mesh.c:750:128: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
vk_model.c:53:9: style: The scope of the variable 'd' can be reduced. [variableScope]
vk_model.c:54:12: style: The scope of the variable 'plane' can be reduced. [variableScope]
vk_model.c:407:7: style: The scope of the variable 'next' can be reduced. [variableScope]
vk_model.c:462:12: style: The scope of the variable 'e' can be reduced. [variableScope]
vk_model.c:519:8: style: The scope of the variable 'planenum' can be reduced. [variableScope]
vk_model.c:519:18: style: The scope of the variable 'side' can be reduced. [variableScope]
vk_model.c:520:8: style: The scope of the variable 'ti' can be reduced. [variableScope]
vk_model.c:613:21: style: The scope of the variable 'p' can be reduced. [variableScope]
vk_model.c:663:21: style: The scope of the variable 'p' can be reduced. [variableScope]
vk_model.c:722:10: style: The scope of the variable 'j' can be reduced. [variableScope]
vk_model.c:783:8: style: The scope of the variable 'bits' can be reduced. [variableScope]
vk_model.c:901:18: style: The scope of the variable 'pinframe' can be reduced. [variableScope]
vk_model.c:901:29: style: The scope of the variable 'poutframe' can be reduced. [variableScope]
vk_model.c:1102:7: style: The scope of the variable 'i' can be reduced. [variableScope]
vk_model.c:1103:13: style: The scope of the variable 'sprout' can be reduced. [variableScope]
vk_model.c:1072:28: style:inconclusive: Function 'R_BeginRegistration' argument 1 names different: declaration 'map' definition 'model'. [funcArgNamesDifferent]
vk_pipeline.c:51:87: style:inconclusive: Function 'QVk_CreatePipeline' argument 2 names different: declaration 'desLayoutCount' definition 'descLayoutCount'. [funcArgNamesDifferent]
vk_rmain.c:405:10: style: The scope of the variable 'scale' can be reduced. [variableScope]
vk_rmain.c:400:28: style:inconclusive: Function 'Vk_DrawParticles' argument 1 names different: declaration 'n' definition 'num_particles'. [funcArgNamesDifferent]
vk_rmain.c:956:62: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
vk_rmain.c:1196:12: style: Variable 'err' is assigned a value that is never used. [unreadVariable]
vk_rmisc.c:97:10: style: The scope of the variable 'temp' can be reduced. [variableScope]
vk_rmisc.c:140:23: style: Variable 'isPreferred' is assigned a value that is never used. [unreadVariable]
vk_rsurf.c:678:11: style: The scope of the variable 'k' can be reduced. [variableScope]
vk_rsurf.c:679:12: style: The scope of the variable 'pplane' can be reduced. [variableScope]
vk_rsurf.c:680:9: style: The scope of the variable 'dot' can be reduced. [variableScope]
vk_rsurf.c:682:12: style: The scope of the variable 'lt' can be reduced. [variableScope]
vk_rsurf.c:741:8: style: The scope of the variable 'i' can be reduced. [variableScope]
vk_rsurf.c:811:22: style: The scope of the variable 'mark' can be reduced. [variableScope]
vk_rsurf.c:980:10: style: The scope of the variable 'c' can be reduced. [variableScope]
vk_rsurf.c:982:7: style: The scope of the variable 'cluster' can be reduced. [variableScope]
vk_rsurf.c:1055:6: style: The scope of the variable 'height' can be reduced. [variableScope]
vk_rsurf.c:1104:13: style: The scope of the variable 'best2' can be reduced. [variableScope]
vk_rsurf.c:1142:11: style: The scope of the variable 'lindex' can be reduced. [variableScope]
vk_rsurf.c:1145:9: style: The scope of the variable 's' can be reduced. [variableScope]
vk_rsurf.c:1145:12: style: The scope of the variable 't' can be reduced. [variableScope]
vk_rsurf.c:1257:12: style: The scope of the variable 'dummy' can be reduced. [variableScope]
vk_swapchain.c:68:7: warning: Possible null pointer dereference: presentModes [nullPointer]
vk_swapchain.c:182:91: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
vk_warp.c:57:8: style: The scope of the variable 'm' can be reduced. [variableScope]
vk_warp.c:64:8: style: The scope of the variable 's' can be reduced. [variableScope]
vk_warp.c:64:11: style: The scope of the variable 't' can be reduced. [variableScope]
vk_warp.c:168:8: style: The scope of the variable 'lindex' can be reduced. [variableScope]
vk_warp.c:325:9: style: The scope of the variable 'j' can be reduced. [variableScope]
vk_warp.c:530:11: style: The scope of the variable 'k' can be reduced. [variableScope]
2020-12-12 14:45:04 +01:00
Denis Pauk
9e71e69d1c fix sequence of destroing buffers 2020-12-12 14:45:04 +01:00
Denis Pauk
ca29093f64 Always compilein validation code 2020-12-12 14:45:04 +01:00
Denis Pauk
dc77a19d9f Allocate buffer for list of physicalDevices in Vk_Strings_f 2020-12-12 14:45:04 +01:00
Denis Pauk
706b9a0721 Codestyle cleanup 2020-12-12 14:45:04 +01:00
Denis Pauk
b1bd71ec7e Fix headers names 2020-12-12 14:45:04 +01:00
Denis Pauk
c9fae86cbe Fix build with -D_DEBUG=1 2020-12-12 14:45:04 +01:00
Denis Pauk
b94afbc6c1 remove unused vk_mem_alloc 2020-12-12 14:45:04 +01:00
Denis Pauk
5b5432b9dd rework code to use vkImage/vkBuffer C allocator 2020-12-12 14:45:04 +01:00
Denis Pauk
bda19f3421 Remove usage stagingBuffer in QVk_CreateIndexBuffer and QVk_CreateVertexBuffer 2020-12-12 14:45:04 +01:00
Denis Pauk
8d39a6a0e6 fix vk_validation flag 2020-12-12 14:45:04 +01:00
Denis Pauk
ffd3c65a82 remove nonrequired image scale 2020-12-12 14:45:04 +01:00
Denis Pauk
8bfb422ab2 Reuse FloodFillSkin from gl3 in vk 2020-12-12 14:45:04 +01:00
Denis Pauk
b249362d0f fix screenshot 2020-12-12 14:45:04 +01:00
Denis Pauk
4047285029 Implement vk image and memory flush code 2020-12-12 14:45:04 +01:00
Denis Pauk
518f46953b Build vk_util as part of ref_vk 2020-12-12 14:45:04 +01:00
Christoph Schied
aaf7f4e76c vk_utils from https://github.com/cschied/q2vkpt.git 2020-12-12 14:45:04 +01:00
Denis Pauk
c4a1147718 little bit revert 2020-12-12 14:45:04 +01:00
Denis Pauk
d3d433bd7f Add EndWorldRenderpass callback 2020-12-12 14:45:04 +01:00
Denis Pauk
31afc11133 make more code static 2020-12-12 14:45:04 +01:00
Denis Pauk
5707a70294 Change gamma only for 3d rendered 2020-12-12 14:45:04 +01:00
Denis Pauk
9bf3be03a7 Replace Vk_ResampleTexture to ResizeSTB 2020-12-12 14:45:04 +01:00
Denis Pauk
bf4a7f9ee6 Fix issue with menu M_Popup
Menu popup can be called without initial run FrameBegin.

 #0  0x0000007ff406bea8 in R_EndWorldRenderpass () at src/client/refresh/vk/vk_rmain.c:937
 #1  0x0000007ff4060b5c in Draw_CharScaled (x=12, y=66, num=num@entry=1, scale=1) at src/client/refresh/vk/vk_draw.c:61
 #2  0x0000005555581900 in M_DrawCharacter (cx=cx@entry=12, cy=cy@entry=66, num=num@entry=1) at src/client/menu/menu.c:410
 #3  0x0000005555581964 in M_DrawTextBox (x=x@entry=12, y=y@entry=66, width=35, lines=3) at src/client/menu/menu.c:487
 #4  0x0000005555581fa0 in M_Popup () at src/client/menu/menu.c:580
 #5  0x0000005555583ad0 in SearchLocalGames () at src/client/menu/menu.c:2771
 #6  0x0000005555583c94 in JoinServer_MenuInit () at src/client/menu/menu.c:2838
 #7  0x0000005555585d2c in M_Menu_JoinServer_f () at src/client/menu/menu.c:2863
 #8  JoinNetworkServerFunc (unused=<optimized out>) at src/client/menu/menu.c:737
 #9  0x0000005555588724 in Action_DoEnter (a=<optimized out>) at src/client/menu/qmenu.c:55
 #10 Menu_SelectItem (s=s@entry=0x5555611148 <s_multiplayer_menu>) at src/client/menu/qmenu.c:566
 #11 0x0000005555586338 in Default_MenuKey (m=0x5555611148 <s_multiplayer_menu>, key=13) at src/client/menu/menu.c:393
 #12 0x00000055555873fc in M_Keydown (key=key@entry=13) at src/client/menu/menu.c:4682
 #13 0x000000555556f194 in Key_Event (key=<optimized out>, down=true, special=special@entry=true) at src/client/cl_keyboard.c:1331
 #14 0x000000555557f078 in IN_Update () at src/client/input/sdl.c:641
 #15 0x0000005555570e64 in CL_Frame (packetdelta=96239, renderdelta=<optimized out>, timedelta=<optimized out>,
    packetframe=packetframe@entry=true, renderframe=renderframe@entry=true) at src/client/cl_main.c:802
 #16 0x00000055555a8a78 in Qcommon_Frame (usec=96239) at src/common/frame.c:626
 #17 0x00000055555a8c98 in Qcommon_Mainloop () at src/common/frame.c:163
 #18 0x00000055555a92f0 in Qcommon_Init (argc=1, argv=0x7ffffff358) at src/common/frame.c:377
 #19 0x0000005555561e44 in main (argc=1, argv=0x7ffffff358) at src/backends/unix/main.c:123
2020-12-12 14:45:04 +01:00
Denis Pauk
400562cd2e Rearrange code little bit 2020-12-12 14:45:04 +01:00
Denis Pauk
e48a7f61c6 Use simular logic in ref_sw:setMode as in ref_gl 2020-12-12 14:45:04 +01:00
Denis Pauk
f508584067 small code cleanup 2020-12-12 14:45:04 +01:00
Denis Pauk
2add32b5a8 Add documentation 2020-12-12 14:45:04 +01:00
Denis Pauk
bfab2d3042 Rebuild shaders with glslang-tools 7.12.3352-10 2020-12-12 14:45:04 +01:00
Yamagi
d291e0bbc5 Add header dependencies for the Vulkan renderer.
While here load the software renderer header dependencies. No one ever
complained about that... -_- And fix a long standing typo.
2020-12-12 14:45:04 +01:00
Yamagi
9801db5c5c Simplify the Vulkan renderer build.
* No need for global CXXFLAGS. The only difference to CFLAGS is the
  standard selector, use $(subst) to derive them from CFLAGS.
* libstd++ must never be manually linked. Doing so only works for the
  GNU C++ stack, not for the LLVM stack and anything else. Link with
  the C++ frontend instead.
* Force MingW to g++ as CXX.Force MingW to g++ as CXX.
* No need to specify -lm, libm is already part of the global LDFLAGS.
* Windows doesn't need -fPIC.
* The Vulkan renderer doesn't use glad.
2020-12-12 14:45:04 +01:00
Yamagi
c895d004d2 Remove artificial Linux only limitation for the Vulkan renderer. 2020-12-12 14:45:04 +01:00
Denis Pauk
eb935da156 vk: fix vid_gamma 2020-12-12 14:45:04 +01:00
Denis Pauk
8b70b55e17 vk: use os independent SDL_Vulkan_GetInstanceExtensions 2020-12-12 14:45:03 +01:00
Denis Pauk
eefcec35e9 ref_vk: Fix shutdown code 2020-12-12 14:45:03 +01:00
Denis Pauk
a71eae8b88 Cleanup create surface 2020-12-12 14:45:03 +01:00
Denis Pauk
a26d91ffc0 vk: Fix for light without current entity(5e7082e7) 2020-12-12 14:45:03 +01:00
Denis Pauk
63f6cdf698 ref_vk: Add support for 32k+ marksurfaces in map(659d8e15) 2020-12-12 14:45:03 +01:00
Denis Pauk
b558407423 use __func__ in R_Printf if required 2020-12-12 14:45:03 +01:00
Denis Pauk
65c76776ec fix world disconnect 2020-12-12 14:45:03 +01:00
Denis Pauk
5270cce1a1 use separate vk_intensity 2020-12-12 14:45:03 +01:00
Denis Pauk
8ae3ce9097 fix warning: missing braces around initializer [-Wmissing-braces] 2020-12-12 14:45:03 +01:00
Denis Pauk
53ddce9400 Add retexturing 2020-12-12 14:45:03 +01:00
Denis Pauk
d895e84f46 use global r_* variables 2020-12-12 14:45:03 +01:00
Denis Pauk
ca60275694 move headers to right place 2020-12-12 14:45:03 +01:00
Denis Pauk
823e0eb915 Add experemental vulkan render 2020-12-12 14:45:03 +01:00
Krzysztof Kondrak
4c3853ca56 vkQuake2 1.4.3
Vulkan render from https://github.com/kondrak/vkQuake2.git@9c85ad15a73320be6641c840697644d27e851fd4
2020-12-12 14:45:03 +01:00
Yamagi
bd4f7bed65
Merge pull request #634 from lazd/altloadfix
Flush keys when server data is parsed
2020-12-12 14:12:50 +01:00
Yamagi
20ec2ba96e
Merge pull request #632 from lazd/joy_expo
Add UI to configure joystick sensitivity, support joystick expo
2020-12-12 14:09:29 +01:00
Larry Davis
e22b4ec945 Don't print debug information all the time 2020-12-11 11:02:53 -08:00
Larry Davis
dc1353c67e Flush keys when server data is parsed, fixes #633 2020-12-11 10:50:40 -08:00