- moved Vulkan and Softpoly backends to 'common'.

This commit is contained in:
Christoph Oelckers 2020-04-29 22:17:35 +02:00
parent bc8335de3b
commit 652712d970
87 changed files with 63 additions and 85 deletions

View file

@ -156,6 +156,7 @@ macro( use_fast_math )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ZD_FASTMATH_FLAG}" )
endmacro()
include( CheckFunctionExists )
macro( require_stricmp )

View file

@ -620,6 +620,15 @@ file( GLOB HEADER_FILES
common/rendering/*.h
common/rendering/gl_load/*.h
common/rendering/hwrenderer/data/*.h
common/rendering/polyrenderer/*.h
common/rendering/polyrenderer/math/*.h
common/rendering/polyrenderer/drawers/*.h
common/rendering/polyrenderer/backend/*.h
common/rendering/vulkan/*.h
common/rendering/vulkan/system/*.h
common/rendering/vulkan/renderer/*.h
common/rendering/vulkan/shaders/*.h
common/rendering/vulkan/textures/*.h
common/scripting/core/*h
common/scripting/vm/*h
common/scripting/jit/*h
@ -643,17 +652,8 @@ file( GLOB HEADER_FILES
rendering/swrenderer/plane/*.h
rendering/swrenderer/things/*.h
rendering/swrenderer/viewport/*.h
rendering/polyrenderer/*.h
rendering/polyrenderer/math/*.h
rendering/polyrenderer/drawers/*.h
rendering/polyrenderer/backend/*.h
rendering/hwrenderer/*.h
rendering/hwrenderer/scene/*.h
rendering/vulkan/*.h
rendering/vulkan/system/*.h
rendering/vulkan/renderer/*.h
rendering/vulkan/shaders/*.h
rendering/vulkan/textures/*.h
*.h
)
@ -664,7 +664,6 @@ set ( SWRENDER_SOURCES
rendering/swrenderer/drawers/r_draw.cpp
rendering/swrenderer/drawers/r_draw_pal.cpp
rendering/swrenderer/drawers/r_draw_rgba.cpp
rendering/swrenderer/drawers/r_thread.cpp
rendering/swrenderer/scene/r_3dfloors.cpp
rendering/swrenderer/scene/r_light.cpp
rendering/swrenderer/scene/r_opaque_pass.cpp
@ -704,12 +703,12 @@ set ( SWRENDER_SOURCES
)
set( POLYRENDER_SOURCES
rendering/polyrenderer/drawers/poly_triangle.cpp
rendering/polyrenderer/drawers/poly_thread.cpp
rendering/polyrenderer/drawers/screen_triangle.cpp
rendering/polyrenderer/drawers/screen_scanline_setup.cpp
rendering/polyrenderer/drawers/screen_shader.cpp
rendering/polyrenderer/drawers/screen_blend.cpp
common/rendering/polyrenderer/drawers/poly_triangle.cpp
common/rendering/polyrenderer/drawers/poly_thread.cpp
common/rendering/polyrenderer/drawers/screen_triangle.cpp
common/rendering/polyrenderer/drawers/screen_scanline_setup.cpp
common/rendering/polyrenderer/drawers/screen_shader.cpp
common/rendering/polyrenderer/drawers/screen_blend.cpp
)
# These files will be flagged as "headers" so that they appear in project files
@ -749,7 +748,7 @@ set( VM_JIT_SOURCES
set( FASTMATH_SOURCES
rendering/swrenderer/r_all.cpp
rendering/swrenderer/r_swscene.cpp
rendering/polyrenderer/poly_all.cpp
common/rendering/polyrenderer/poly_all.cpp
common/textures/hires/hqnx/init.cpp
common/textures/hires/hqnx/hq2x.cpp
common/textures/hires/hqnx/hq3x.cpp
@ -779,22 +778,22 @@ set( FASTMATH_SOURCES
#Vulkan stuff must go into a separate list because it needs to be disabled for some platforms
set (VULKAN_SOURCES
rendering/vulkan/system/vk_device.cpp
rendering/vulkan/system/vk_swapchain.cpp
rendering/vulkan/system/vk_builders.cpp
rendering/vulkan/system/vk_framebuffer.cpp
rendering/vulkan/system/vk_buffers.cpp
rendering/vulkan/renderer/vk_renderstate.cpp
rendering/vulkan/renderer/vk_renderpass.cpp
rendering/vulkan/renderer/vk_streambuffer.cpp
rendering/vulkan/renderer/vk_postprocess.cpp
rendering/vulkan/renderer/vk_renderbuffers.cpp
rendering/vulkan/shaders/vk_shader.cpp
rendering/vulkan/textures/vk_samplers.cpp
rendering/vulkan/textures/vk_hwtexture.cpp
rendering/vulkan/textures/vk_imagetransition.cpp
rendering/vulkan/thirdparty/volk/volk.c
rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp
common/rendering/vulkan/system/vk_device.cpp
common/rendering/vulkan/system/vk_swapchain.cpp
common/rendering/vulkan/system/vk_builders.cpp
common/rendering/vulkan/system/vk_framebuffer.cpp
common/rendering/vulkan/system/vk_buffers.cpp
common/rendering/vulkan/renderer/vk_renderstate.cpp
common/rendering/vulkan/renderer/vk_renderpass.cpp
common/rendering/vulkan/renderer/vk_streambuffer.cpp
common/rendering/vulkan/renderer/vk_postprocess.cpp
common/rendering/vulkan/renderer/vk_renderbuffers.cpp
common/rendering/vulkan/shaders/vk_shader.cpp
common/rendering/vulkan/textures/vk_samplers.cpp
common/rendering/vulkan/textures/vk_hwtexture.cpp
common/rendering/vulkan/textures/vk_imagetransition.cpp
common/rendering/vulkan/thirdparty/volk/volk.c
common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.cpp
)
if (HAVE_VULKAN)
@ -802,10 +801,10 @@ if (HAVE_VULKAN)
endif()
set (POLYBACKEND_SOURCES
rendering/polyrenderer/backend/poly_framebuffer.cpp
rendering/polyrenderer/backend/poly_buffers.cpp
rendering/polyrenderer/backend/poly_hwtexture.cpp
rendering/polyrenderer/backend/poly_renderstate.cpp
common/rendering/polyrenderer/backend/poly_framebuffer.cpp
common/rendering/polyrenderer/backend/poly_buffers.cpp
common/rendering/polyrenderer/backend/poly_hwtexture.cpp
common/rendering/polyrenderer/backend/poly_renderstate.cpp
)
set (FASTMATH_SOURCES ${FASTMATH_SOURCES} ${POLYBACKEND_SOURCES})
@ -1113,6 +1112,7 @@ set (PCH_SOURCES
common/objects/dobjtype.cpp
common/rendering/v_framebuffer.cpp
common/rendering/v_video.cpp
common/rendering/r_thread.cpp
common/rendering/r_videoscale.cpp
common/rendering/hwrenderer/data/hw_clock.cpp
common/rendering/hwrenderer/data/hw_skydome.cpp
@ -1252,6 +1252,9 @@ include_directories( .
common/rendering/hwrenderer/data
common/rendering/gl_load
common/rendering/gl
common/rendering/vulkan/thirdparty
common/rendering/polyrenderer/backend
common/rendering/polyrenderer/drawers
common/scripting/vm
common/scripting/jit
common/scripting/core
@ -1278,7 +1281,6 @@ include_directories( .
scripting
scripting/zscript
rendering
rendering/vulkan/thirdparty
../libraries/gdtoa
../libraries/glslang/glslang/Public
../libraries/glslang/spirv
@ -1347,7 +1349,7 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
# Need to enable intrinsics for these files.
if( SSE_MATTERS )
set_property( SOURCE
rendering/polyrenderer/poly_all.cpp
common/rendering/polyrenderer/poly_all.cpp
rendering/swrenderer/r_all.cpp
utility/palette.cpp
utility/x86.cpp
@ -1396,13 +1398,6 @@ source_group("Rendering" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/render
source_group("Rendering\\2D" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/2d/.+")
source_group("Rendering\\Hardware Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/gl/.+")
source_group("Rendering\\Hardware Renderer\\Scene" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/hwrenderer/scene/.+")
source_group("Rendering\\Vulkan Renderer\\System" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/system/.+")
source_group("Rendering\\Vulkan Renderer\\Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/renderer/.+")
source_group("Rendering\\Vulkan Renderer\\Shaders" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/shaders/.+")
source_group("Rendering\\Vulkan Renderer\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/textures/.+")
source_group("Rendering\\Vulkan Renderer\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/thirdparty/.+")
source_group("Rendering\\Vulkan Renderer\\Third Party\\Volk" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/thirdparty/volk/.+")
source_group("Rendering\\Vulkan Renderer\\Third Party\\Vk_Mem_Alloc" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/vulkan/thirdparty/vk_mem_alloc.+")
source_group("Rendering\\Software Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/swrenderer/.+")
source_group("Rendering\\Software Renderer\\Drawers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/swrenderer/drawers/.+")
source_group("Rendering\\Software Renderer\\Scene" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/swrenderer/scene/.+")
@ -1411,10 +1406,6 @@ source_group("Rendering\\Software Renderer\\Line" REGULAR_EXPRESSION "^${CMAKE_C
source_group("Rendering\\Software Renderer\\Plane" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/swrenderer/plane/.+")
source_group("Rendering\\Software Renderer\\Things" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/swrenderer/things/.+")
source_group("Rendering\\Software Renderer\\Viewport" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/swrenderer/viewport/.+")
source_group("Rendering\\Poly Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/.+")
source_group("Rendering\\Poly Renderer\\Math" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/math/.+")
source_group("Rendering\\Poly Renderer\\Drawers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/drawers/.+")
source_group("Rendering\\Poly Renderer\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rendering/polyrenderer/backend/.+")
source_group("Render Data" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_data/.+")
source_group("Render Interface" FILES r_defs.h r_renderer.h r_sky.cpp r_sky.h r_state.h r_utility.cpp r_utility.h)
source_group("Platforms\\POSIX Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/posix/.+")
@ -1454,6 +1445,16 @@ source_group("Common\\Rendering\\Hardware Renderer\\Data" REGULAR_EXPRESSION "^$
source_group("Common\\Rendering\\Hardware Renderer\\Postprocessing" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/hwrenderer/postprocessing/.+")
source_group("Common\\Rendering\\OpenGL Loader" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/gl_load/.+")
source_group("Common\\Rendering\\OpenGL Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/gl/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\System" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/system/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/renderer/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\Shaders" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/shaders/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/textures/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\Third Party" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\Third Party\\Volk" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/volk/.+")
source_group("Common\\Rendering\\Vulkan Renderer\\Third Party\\Vk_Mem_Alloc" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/vulkan/thirdparty/vk_mem_alloc.+")
source_group("Common\\Rendering\\Poly Renderer" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/polyrenderer/.+")
source_group("Common\\Rendering\\Poly Renderer\\Drawers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/polyrenderer/drawers/.+")
source_group("Common\\Rendering\\Poly Renderer\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/polyrenderer/backend/.+")
source_group("Common\\Models" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/models/.+")
source_group("Common\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/.+")
source_group("Common\\Textures\\Hires" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/hires/.+")

View file

@ -58,7 +58,7 @@
#include "vulkan/system/vk_framebuffer.h"
#endif
#ifdef HAVE_SOFTPOLY
#include "rendering/polyrenderer/backend/poly_framebuffer.h"
#include "poly_framebuffer.h"
#endif
extern bool ToggleFullscreen;

View file

@ -55,7 +55,7 @@
#endif
#ifdef HAVE_SOFTPOLY
#include "rendering/polyrenderer/backend/poly_framebuffer.h"
#include "poly_framebuffer.h"
#endif
// MACROS ------------------------------------------------------------------

View file

@ -2,7 +2,7 @@
#include "win32basevideo.h"
#include "c_cvars.h"
#include "rendering/polyrenderer/backend/poly_framebuffer.h"
#include "poly_framebuffer.h"
EXTERN_CVAR(Bool, vid_fullscreen)

View file

@ -2,7 +2,7 @@
#include "win32basevideo.h"
#include "c_cvars.h"
#include "rendering/vulkan/system/vk_framebuffer.h"
#include "vulkan/system/vk_framebuffer.h"
EXTERN_CVAR(Bool, vid_fullscreen)

View file

@ -23,7 +23,7 @@
#include "poly_buffers.h"
#include "poly_framebuffer.h"
#include "poly_renderstate.h"
#include "rendering/polyrenderer/drawers/poly_thread.h"
#include "poly_thread.h"
#include "engineerrors.h"
PolyBuffer *PolyBuffer::First = nullptr;

View file

@ -3,7 +3,7 @@
#include "gl_sysfb.h"
#include "r_memory.h"
#include "r_thread.h"
#include "rendering/polyrenderer/drawers/poly_triangle.h"
#include "poly_triangle.h"
struct FRenderViewpoint;
class PolyDataBuffer;

View file

@ -2,7 +2,7 @@
#pragma once
#include "polyrenderer/backend/poly_buffers.h"
#include "rendering/polyrenderer/drawers/poly_triangle.h"
#include "poly_triangle.h"
#include "name.h"

View file

@ -1,4 +1,3 @@
#include "../swrenderer/textures/r_swtexture.h"
#include "drawers/poly_triangle.cpp"
#include "drawers/poly_thread.cpp"
#include "drawers/screen_triangle.cpp"

View file

@ -22,17 +22,13 @@
#include <stddef.h>
#include "templates.h"
#include "doomdef.h"
#include "i_system.h"
#include "filesystem.h"
#include "v_video.h"
#include "doomstat.h"
#include "st_stuff.h"
#include "g_game.h"
#include "g_level.h"
#include "r_thread.h"
#include "r_memory.h"
#include "swrenderer/r_renderthread.h"
#include "poly_thread.h"
#include "printf.h"
#include "polyrenderer/drawers/poly_triangle.h"
#include <chrono>

View file

@ -36,6 +36,7 @@
#include "flatvertices.h"
#include "r_videoscale.h"
#include "filesystem.h"
#include "templates.h"
EXTERN_CVAR(Int, gl_dither_bpc)

View file

@ -8,7 +8,6 @@
#include "name.h"
#include "hwrenderer/scene/hw_drawstructs.h"
#include "hw_renderstate.h"
#include "hw_material.h"

View file

@ -27,7 +27,6 @@
#include "templates.h"
#include "r_videoscale.h"
#include "i_time.h"
#include "g_game.h"
#include "v_text.h"
#include "version.h"
#include "v_draw.h"
@ -35,7 +34,6 @@
#include "hw_clock.h"
#include "hw_vrmodes.h"
#include "hw_cvars.h"
#include "hw_models.h"
#include "hw_skydome.h"
#include "hwrenderer/data/hw_viewpointbuffer.h"
#include "flatvertices.h"

View file

@ -1,7 +1,7 @@
#ifndef __VK_SAMPLERS_H
#define __VK_SAMPLERS_H
#include "rendering/vulkan/system/vk_objects.h"
#include "vulkan/system/vk_objects.h"
class VulkanDevice;

View file

@ -18,10 +18,6 @@
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
** 4. When not used as part of ZDoom or a ZDoom derivative, this code will be
** covered by the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or (at
** your option) any later version.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

View file

@ -18,10 +18,6 @@
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
** 4. When not used as part of ZDoom or a ZDoom derivative, this code will be
** covered by the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or (at
** your option) any later version.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

View file

@ -19,10 +19,6 @@
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
** 4. When not used as part of ZDoom or a ZDoom derivative, this code will be
** covered by the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or (at
** your option) any later version.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

View file

@ -19,10 +19,6 @@
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
** 4. When not used as part of ZDoom or a ZDoom derivative, this code will be
** covered by the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or (at
** your option) any later version.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES

View file

@ -5,7 +5,6 @@
#include "drawers/r_draw.cpp"
#include "drawers/r_draw_pal.cpp"
#include "drawers/r_draw_rgba.cpp"
#include "drawers/r_thread.cpp"
#include "line/r_fogboundary.cpp"
#include "line/r_line.cpp"
#include "line/r_farclip_line.cpp"