Magnus Norddahl
44c2223c2f
Draw 8-bit software renderer with polybackend (well, sort of!)
2019-12-02 01:07:28 +01:00
Magnus Norddahl
4a2b763aaa
Support 8-bit textures
2019-12-02 00:35:15 +01:00
Magnus Norddahl
74c6b9fe6d
Remove PolyDrawArgs
2019-12-02 00:21:42 +01:00
Magnus Norddahl
d2f4570337
Remove old polyargs
2019-12-02 00:01:04 +01:00
Magnus Norddahl
4a4b79194d
Remove/disable old swrenderer model rendering code
2019-12-01 23:37:43 +01:00
Magnus Norddahl
3059b8f5c8
Remove old softpoly drawer implementation
2019-12-01 23:23:25 +01:00
Rachael Alexanderson
f1e136487d
Merge branch 'polybackend' of https://github.com/coelckers/gzdoom into polybackend
2019-12-01 16:06:54 -05:00
Rachael Alexanderson
bdc7329d32
- replace vid_enablevulkan with vid_preferbackend - disabled startup window selector for this (will replace when the startup screen changes are done)
2019-12-01 16:06:36 -05:00
Magnus Norddahl
8ca05fe30a
Implement crossfade
2019-12-01 22:05:10 +01:00
Magnus Norddahl
1b9479ea45
Implement burn.fp and second texture binding
2019-12-01 21:44:44 +01:00
Magnus Norddahl
2c751d214f
Hook up some SSE2
2019-12-01 20:23:41 +01:00
Magnus Norddahl
4a25c9f69b
Merge remote-tracking branch 'origin/master' into polybackend
2019-12-01 20:09:19 +01:00
Christoph Oelckers
354d5eb66e
- Renamed AlignedAlloc.
...
according to Travis error logs these AlignedAlloc lines were causing compile errors, presumably AlignedAlloc was defined to aligned_alloc, so better use different names.
2019-11-24 10:42:18 +01:00
Magnus Norddahl
bff22bbd81
- don't map the frame buffer memory every frame when doing software rendering
2019-11-23 12:09:05 +01:00
Magnus Norddahl
8abbd63427
Only allocate WallColumnDrawerArgs once per thread
2019-11-23 11:57:42 +01:00
alexey.lysiuk
c75233a842
- avoid name clashing with C11 function
...
src/rendering/swrenderer/r_memory.cpp:78:14: error: ‘void* aligned_alloc(size_t, size_t)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
2019-11-23 11:17:34 +02:00
Magnus Norddahl
b7745aaa8b
Make absolutely sure allocated frame memory is always 16-byte aligned
2019-11-23 02:26:52 +01:00
Magnus Norddahl
62b2039a75
Queue a full wall as one draw command
2019-11-23 02:25:42 +01:00
Magnus Norddahl
310459b490
Remove dead code
2019-11-20 22:11:40 +01:00
Magnus Norddahl
2ac6be3510
- fix scale bug and remove some member variables
2019-11-20 22:06:15 +01:00
Magnus Norddahl
236b476933
- change ProjectedWallTexcoords to use gradients for its texture coordinate calculations
...
- change SpriteDrawerArgs to draw a full sprite instead of one column at a time
- add r_noaccel cvar to allow forced software rendering of the psprites (useful for debugging and also one person on the forum actually requested this feature)
- remove FWallTmapVals and calculate texture coordinates directly from FWallCoords
- move portal clipping out of the inner sprite drawing loop
2019-11-20 04:50:24 +01:00
Magnus Norddahl
1085287af1
Reverse the order of the functions in r_walldraw
2019-11-15 22:47:40 +01:00
Magnus Norddahl
16c2d9366d
Remove ProcessWallNP2 as NPOT textures are already handled elsewhere
2019-11-15 22:28:59 +01:00
Magnus Norddahl
9f9884d03c
- move decal light calculations into RenderDecal::RenderDecals
2019-11-15 06:06:11 +01:00
Magnus Norddahl
a478cf9a96
- support dynamic lights on translucent and 3d floor walls
2019-11-15 05:53:55 +01:00
Magnus Norddahl
7168466c28
Calculate all light in RenderWallPart
2019-11-15 05:45:52 +01:00
Magnus Norddahl
82855ab1fd
Calculate light closer to where it is used
2019-11-15 05:21:10 +01:00
Magnus Norddahl
3428b50924
Fix type typo
2019-11-15 03:46:21 +01:00
Magnus Norddahl
608895dae7
Fix fog boundary drawing for 3d floors and add a few helper functions to RenderDrawSegment
2019-11-15 03:41:10 +01:00
Magnus Norddahl
642cd2b160
Fix 3d floor rendering bug
2019-11-14 02:28:53 +01:00
Magnus Norddahl
88848f1d59
Add some helpers on DrawSegmentClipInfo
2019-11-13 04:17:46 +01:00
Magnus Norddahl
72bba914ce
Move drawseg clipping variables to DrawSegmentClipInfo
2019-11-12 19:46:45 +01:00
Magnus Norddahl
879fae7cd0
Also calculate wallsprite and decal texture coordinates in ProjectedWallTexcoords
2019-11-12 18:44:17 +01:00
Magnus Norddahl
fa3e5e34a8
Move all ProjectedWallTexcoords calculations to that class
2019-11-12 02:22:30 +01:00
Magnus Norddahl
e388abbb77
Clarify that 'fake wall' means a 3d floor wall
2019-11-11 23:41:14 +01:00
Magnus Norddahl
fec280a5fc
Remove the sprite drawer from wall drawing
2019-11-11 05:37:02 +01:00
Magnus Norddahl
3944ee5b67
- Calculate drawseg texture coordinates in r_line
2019-11-11 04:10:08 +01:00
Magnus Norddahl
6410bc81cc
- merge top/mid/bottom texture coordinate calculations
2019-11-11 03:19:00 +01:00
Magnus Norddahl
48d0ebab58
Convert some variables to be function local
2019-11-09 05:29:14 +01:00
Magnus Norddahl
b40ffb1d64
Move more texture coordinate variables into ProjectedWallTexcoords
2019-11-09 04:45:39 +01:00
Magnus Norddahl
5c21a6c973
Remove the ProjectedWallTexcoords arrays
2019-11-09 03:16:48 +01:00
Magnus Norddahl
370c185415
Mark FWallTmapVals members as private and make FWallTmapVals part of wallsetup
2019-11-09 02:41:37 +01:00
Magnus Norddahl
7fae5ea905
Remove unused code
2019-11-09 00:07:33 +01:00
Magnus Norddahl
62ec165d28
Further isolate texture coordinate calculations to r_wallsetup
2019-11-08 03:46:07 +01:00
Chronos Ouroboros
c64fafc490
Merge pull request #701 from Doom2fan/DirectNativeShape2D
...
Added direct-native versions of the Shape2D API.
2019-11-07 18:49:53 -03:00
drfrag
bd90a768f5
- Fixed stretching for 256 and 240 pixels tall skies in software.
2019-11-02 22:57:31 +01:00
Chronos Ouroboros
8f7e902875
Fixed ZScript's Screen.DrawLine using the wrong color when drawing pure black.
2019-10-26 13:42:24 -03:00
Chronos Ouroboros
1a67899bba
Added direct-native versions of the Shape2D linear transform API.
2019-10-19 05:25:31 -03:00
Chronos Ouroboros
f45ade151a
Added direct-native versions of the Shape2D API.
2019-10-19 04:41:57 -03:00
drfrag
525d678219
- Fixed capped tall skies not working (Heretic and Hexen).
...
- Fixed sky stretching for the new freelook limit.
2019-10-09 15:08:39 -04:00
alexey.lysiuk
f678b5d4d6
- fixed crash on closing fatal error window
...
Framebuffer was accessed after its destruction
2019-10-08 12:39:45 +02:00
Christoph Oelckers
2e7af1338c
- the big cleanup of the exit cleanup is done!
...
atterm is gone and only a few system-side functions use atexit.
All game side cleanup is performed in D_DoomMain now.
2019-10-07 20:28:55 +02:00
Rachael Alexanderson
5cbb1c86ab
- add missing information for the drawers, from the wallsprite code. this reverts a revert.
...
This reverts commit 338430995e
.
2019-10-05 14:51:48 -04:00
drfrag
e6c6b617e2
- Fixed crash with wallsprites in the software renderer for real.
2019-10-05 19:18:00 +02:00
drfrag
338430995e
Revert "- fixed a crash in the software renderer that caused wallsprites to crash"
...
This reverts commit 0dea6fcecc
.
2019-10-05 19:18:00 +02:00
alexey.lysiuk
9332316c2a
- set initial vsync state after creation of framebuffer
...
https://forum.zdoom.org/viewtopic.php?t=66020
2019-10-04 10:46:52 +03:00
Rachael Alexanderson
0dea6fcecc
- fixed a crash in the software renderer that caused wallsprites to crash
...
(note: there is still a bug with grabbing the texture for these)
2019-10-03 23:32:14 -04:00
Christoph Oelckers
5179a69fdb
- don't let Vulkan access the vid_vsync variable directly.
...
Since the FrameBuffers have a SetVsync method anything these last set must count, not the global variable directly.
2019-10-01 20:50:15 +02:00
Christoph Oelckers
86ab366958
- some reformatting on exit code, mainly to make searching for the content easier.
2019-10-01 19:06:28 +02:00
Christoph Oelckers
2a3205200f
- reordered a few things in the startup procedure
...
Mainly done to isolate the calls that actually manipulate the global frame buffer.
V_Init alsoi initialized some palette data, which was moved to V_InitPalette and did something entirely different when running a restart as opposed to an initial start.
2019-10-01 00:21:51 +02:00
drfrag
634ef60c78
- Fixed player sprites not being affected by sector light level in the classic software renderer.
2019-09-28 10:31:27 +02:00
Christoph Oelckers
c3f26422df
- changed MIDI sources so that they do not have to include i_musicinterns.h anymore.
...
They were already clean of unwanted external references, but including this file made it hard to keep it that way.
This also moves a few useful definitions around to less 'dirty' headers.
2019-09-25 21:47:33 +02:00
Marisa Kirisame
8dbddfc365
Fix crash on vulkan with a large number of texture shaders.
2019-09-25 17:46:33 +03:00
Rachael Alexanderson
7ba485f632
fixed the software resized texture warp problem. ( #934 )
...
* - almost nearly fixed the software resized texture warp problem.
* - proposed fix for mipmapping issue for previous commit
* - reduce texture allocation for mipmapped warped textures in the software renderer
* - add a check for the resize mode
2019-09-23 22:37:35 -04:00
drfrag
0cbb08ce84
- Fixed crash with mock2.wad in software.
2019-09-14 13:13:55 -04:00
Rachael Alexanderson
836f774b6c
- use drfrag's suggested fix of checking for valid texture access, rather than checking whether it is null, when drawing fog boundaries in the software renderer
2019-09-13 09:18:26 -04:00
Magnus Norddahl
7d73616fda
- release any references to command buffer when flushed
2019-08-25 12:12:29 +02:00
Magnus Norddahl
a410324084
Merge remote-tracking branch 'origin/master' into polybackend
2019-08-25 11:54:45 +02:00
Christoph Oelckers
38fec546a7
- moved the generic palette utilities and the matrix class to 'utility'
2019-08-20 23:05:20 +02:00
Christoph Oelckers
9210811b74
- patch the token 'texture2d' in GLSL sources.
...
This builtin function no longer exists outside of backwards compatible GLSL compilers so it needs to be remapped to 'texture' so that user shaders still using it can compile.
2019-08-18 14:50:37 +02:00
Patryk Obara
4c98b69b6b
- use fallback implementation for C++ aligned_alloc
...
This function was introduced in C++17, then backported to older versions
of glibc++ library, but is not available in older releases (it's missing
from Ubuntu 12.04 derived SteamRT for example).
2019-08-16 20:44:29 +03:00
Christoph Oelckers
5e4de10f97
- fixed survey data retrieval for Vulkan.
2019-08-11 21:26:08 +02:00
Christoph Oelckers
1e4a32004b
- fixed bad texture canvas checks when in truecolor software rendering.
2019-08-09 13:59:54 +02:00
Magnus Norddahl
d1026e4b5b
- call vkDeviceWaitIdle before RAII tears down buffers
2019-08-08 20:56:11 +02:00
Magnus Norddahl
7746b2c6fd
- add light array
2019-08-06 07:15:07 +02:00
Magnus Norddahl
b34658d4d8
- fix out of bounds crash
2019-08-06 06:21:37 +02:00
Magnus Norddahl
eb127d0dac
- implement more shaders
2019-08-06 04:51:37 +02:00
Magnus Norddahl
4e24fdacf0
- implement more of the default shader
2019-08-05 23:31:56 +02:00
Magnus Norddahl
82a17572ef
- implement getTexel part of main.fp
2019-08-05 19:32:54 +02:00
Magnus Norddahl
b17351cda4
- implement blend functions
2019-08-05 08:37:22 +02:00
Magnus Norddahl
f73470dcf4
- rewrite screen triangle drawer to be more modular and better support the hwrenderer shaders
2019-08-05 03:23:04 +02:00
Magnus Norddahl
ebe377e5de
- remove TriDrawTriangleArgs::uniforms as it is redundant
2019-08-04 02:57:08 +02:00
Magnus Norddahl
7940d5fe01
Merge remote-tracking branch 'origin/master' into polybackend
2019-08-04 02:22:55 +02:00
alexey.lysiuk
ff4bc8bab9
- use EXT_metal_surface extension for Vulkan surface creation
...
Prefer EXT_metal_surface over deprecated MVK_macos_surface extension, and use it only when modern one is not available
2019-08-03 13:16:12 +03:00
alexey.lysiuk
cf81ab465e
- updated Vulkan headers to version 1.1.114
...
This is the latest version released with Vulkan SDK
New headers are needed for EXT_metal_surface
2019-08-03 10:52:04 +03:00
alexey.lysiuk
5870cb7ea1
- recreate Vulkan swapchain in case of surface lost error
...
Do not abort with fatal error when VK_ERROR_SURFACE_LOST_KHR was returned from vkAcquireNextImageKHR() or vkQueuePresentKHR()
So far, only gfx-portability implementation is reporting this error from time to time, usually on startup, entering the game, or task switching
2019-08-02 10:21:06 +03:00
alexey.lysiuk
370f5ef234
- fixed writing of texture matrices in Vulkan render backend
...
https://forum.zdoom.org/viewtopic.php?t=65479
2019-07-30 11:46:14 +03:00
Christoph Oelckers
afbd7f7a24
- increased StreamBuffer size because I got it to crash with comatose.wad once due to an overflow here.
2019-07-28 19:05:39 +02:00
Magnus Norddahl
ad8c5bb96e
- add VkRenderPassManager::GetVertexFormat so that all VkRenderState access is done through functions that can then be made thread safe
2019-07-28 17:20:49 +02:00
Magnus Norddahl
76675a4d61
- add VkMatrixBufferWriter so that both buffers are used same way in VkRenderState
2019-07-28 17:04:56 +02:00
Magnus Norddahl
4adac3fe59
- move streaming uniform buffers out of VkRenderState
2019-07-28 16:28:43 +02:00
Magnus Norddahl
97a4f25771
- hook up dynamic lights
2019-07-25 04:19:05 +02:00
Magnus Norddahl
a55412fcf6
- fix crash when rendering models
2019-07-24 23:25:48 +02:00
Magnus Norddahl
ec82f994f7
- hook up software renderer
2019-07-24 22:13:00 +02:00
Magnus Norddahl
e6f6f10e81
Merge remote-tracking branch 'origin/master' into polybackend
2019-07-24 21:39:07 +02:00
Christoph Oelckers
7346288bf5
- moved some more files.
2019-07-14 21:09:49 +02:00
Marisa Kirisame
bdb083f457
Shape2D drawing will gracefully abort the VM on any out of bounds access.
2019-07-12 17:44:54 +02:00
Christoph Oelckers
5df8919b90
Merge branch 'master' into userlights
2019-07-07 08:11:09 +02:00
Dzmitry Malyshau
3467e0edcf
Switch command buffers to be one-time-submittable ( #885 )
2019-07-05 02:15:59 +02:00
Dzmitry Malyshau
e7e46f8c7c
vk: Check for the time query support on the graphics queue ( #884 )
2019-07-03 16:49:06 +02:00
Christoph Oelckers
5ef43143f8
- removed unused CVAR_GUID type
2019-06-27 09:16:34 +02:00
Magnus Norddahl
557206131c
- remove debug statement
2019-06-23 23:53:42 +02:00
Magnus Norddahl
e59c5cb947
- fix missing font glyphs
2019-06-23 21:24:37 +02:00
Magnus Norddahl
706bc0b7c6
Merge remote-tracking branch 'origin/master' into polybackend
2019-06-23 20:29:04 +02:00
Christoph Oelckers
3d3f364874
- consolidated postprocessing code a bit.
...
The code that determines the order of effects should not be duplicated between renderers.
2019-06-20 11:55:45 +02:00
Magnus Norddahl
774955dbc4
- write into stream buffers before opening the next render pass
2019-06-16 13:08:25 +02:00
Magnus Norddahl
d31dbf14e4
- wait for space if the stream buffers are exhausted
2019-06-16 13:05:12 +02:00
Magnus Norddahl
240a32f4c8
- also reset framebuffers when the image is reset
2019-06-16 10:31:12 +02:00
alexey.lysiuk
7e901055ea
- fixed: light mode from mapinfo had no effect
...
https://forum.zdoom.org/viewtopic.php?t=64997
2019-06-12 09:49:40 +03:00
Magnus Norddahl
82ebcc4946
- fix compile errors
2019-06-10 23:00:15 +02:00
Magnus Norddahl
bb47230f79
Merge remote-tracking branch 'origin/master' into polybackend
2019-06-10 22:46:32 +02:00
Magnus Norddahl
5dd06de48c
- fix compile error
2019-06-10 22:46:13 +02:00
Magnus Norddahl
a093f686a7
- store the vulkan framebuffer with the image (this ensures the framebuffer object is destroyed along with the image)
2019-06-10 22:14:02 +02:00
Christoph Oelckers
2766303cfc
- consolidated the 3 atterm implementations.
...
Each platform had its own copy. Why?
2019-06-10 12:01:01 +02:00
Christoph Oelckers
9f2fbc1294
- renamed GLViewpointBuffer to HWViewpointBuffer.
2019-06-10 10:50:45 +02:00
Magnus Norddahl
13cab1c0b6
- delay postprocess texture destruction until the end of the frame
2019-06-10 09:13:56 +02:00
Magnus Norddahl
8853872bb4
- fix wipe screen when using -loadgame
2019-06-10 08:40:49 +02:00
Christoph Oelckers
037b69c8a7
- reworked buffer binding logic.
...
This shouldn't be in the hardware independent interface because the semantics on OpenGL and Vulkan are too different, so a common implementation is not possible.
Most bind calls were in the GL interface anyway, so these no longer pass through hardware independent code.
This also moves the bind calls in the shadowmap code into the GL interface - these never did anything useful in Vulkan and aren't needed there.
Last but not least, this moves the legacy buffer binding handling into FGLRenderState and performs the initial binding for the light buffer in a more suitable place so that this doesn't have to pollute the render state.
2019-06-09 20:37:11 +02:00
Gutawer
324a720d56
- added a linear transformation system to Shape2D so that things like rotations and scales can be changed without having to clear and push a large amount of data
2019-06-08 14:05:32 +02:00
Magnus Norddahl
c9ee880196
- fix loadgame crash
2019-06-06 18:56:34 +02:00
Magnus Norddahl
ae69abc049
- FXAA_DISCARD should never be enabled. It only works when the output framebuffer is the same as the original.
2019-06-05 19:06:33 +02:00
alexey.lysiuk
4d29b5b5e7
- limited disabling of FXAA discard to Vulkan on AMD hardware
2019-06-04 12:43:08 +03:00
alexey.lysiuk
dc8a944382
- implemented GPU vendor string assingment in Vulkan backend
2019-06-04 12:42:01 +03:00
alexey.lysiuk
addcad8ac0
- disabled discard in FXAA shader with Vulkan backend
...
Discard caused graphical corruptions on AMD hardware with Vulkan backend enabled
https://forum.zdoom.org/viewtopic.php?t=64230
2019-06-04 11:32:00 +03:00
Edoardo Prezioso
589f9b5c24
- Fixed uninitialized variable in case GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS does not exist.
...
Old graphics, like mine (Intel Sandybridge Mobile, GL 3.0 Mesa) do not support this, therefore most of the time RFL_SHADER_STORAGE_BUFFER wasn't unset (I found no consequence of this on my machine, but better safe than sorry).
Found out by Valgrind.
2019-06-02 21:20:53 +02:00
Magnus Norddahl
91ec1463b8
- add line drawer
2019-05-31 08:49:08 +02:00
Magnus Norddahl
80805656ed
- implement alpha test
2019-05-31 06:43:24 +02:00
Magnus Norddahl
a5608c67b5
- upload using all threads
2019-05-31 05:42:04 +02:00
Magnus Norddahl
4a7824c380
- implement vsync and letterbox
2019-05-31 05:22:06 +02:00
Christoph Oelckers
6ace482266
- fixed fillSimplePoly for indexed data.
...
On OpenGL this merely caused some visual glitches on the cheat automap - but the bad data in the buffer can make Vulkan abort entirely.
2019-05-30 13:32:42 +02:00
Magnus Norddahl
b9230d4425
- fix negative uLightLevel being applied
2019-05-29 06:42:02 +02:00
Magnus Norddahl
a1229be5c6
- implement camera textures
2019-05-29 05:45:19 +02:00
Magnus Norddahl
be5ecce598
- fix fill color and translucency
2019-05-29 02:22:45 +02:00
Magnus Norddahl
eff38393af
- fix stencil writing color
2019-05-29 01:14:42 +02:00
Magnus Norddahl
555beb58f0
- tell softpoly backend which hwrenderer shader is active and use that to decide which drawer to use
2019-05-28 08:13:19 +02:00
Magnus Norddahl
bd591c75fb
- implement depth bias
2019-05-28 06:45:21 +02:00
Magnus Norddahl
b6e00cb208
- fix use after delete of some textures
2019-05-27 21:23:58 +02:00
Magnus Norddahl
c2535519e8
- fix blend mode for the fireballs
2019-05-27 20:20:20 +02:00
Magnus Norddahl
9f8cd68211
- fix use after delete
2019-05-27 20:03:11 +02:00
Magnus Norddahl
117617aad8
- minor blend and light adjustment
2019-05-27 19:18:27 +02:00
Magnus Norddahl
0d8d50c23e
- fix viewport location
...
- add scissor support
2019-05-27 16:51:54 +02:00
Magnus Norddahl
8db5e72254
- add PolyTriangleDrawer functions for the operations needed by PolyRenderState
2019-05-27 07:57:27 +02:00
Magnus Norddahl
3a3de13abd
- hook up main.vp and the data it uses for input
2019-05-26 01:00:36 +02:00
Magnus Norddahl
fbaeb11fba
- convert main.vp to c++ so softpoly can use it
2019-05-25 01:27:20 +02:00
Magnus Norddahl
b453e15929
- adjust PolyTriangleDrawer to closer match what PolyRenderState receives as input
2019-05-24 22:30:14 +02:00
Magnus Norddahl
4fd4bfa092
Merge remote-tracking branch 'origin/master' into polybackend
2019-05-24 19:21:36 +02:00
alexey.lysiuk
da2d0e47e6
- removed array length() function from shadowmap shader
...
Array's length() function is not yet supported by SPIRV-cross and MoltenVK
Its usage was replaced by explicit nodes count value passed as uniform
2019-05-24 14:29:37 +03:00
Magnus Norddahl
756c593e96
- create a new error class for vulkan errors as they are only recoverable during initialization (unlike CRecoverableError which is recoverable during normal processing)
...
- improve vulkan errors by including the status code returned by vulkan if they fail
2019-05-23 14:09:05 +02:00
Magnus Norddahl
0cb3605c70
- fix null drawers
...
- slightly better renderstyle drawer selection
2019-05-22 21:23:10 +02:00
Magnus Norddahl
d724b623d1
- enable the depth buffer
...
- support vid_scalefactor
2019-05-22 17:56:29 +02:00