Commit Graph

658 Commits

Author SHA1 Message Date
Geoffrey McRae
84dd68dd2b [host] dxgi: correct 24-bit packed output height calculation bug 2024-01-27 11:14:04 +11:00
Geoffrey McRae
738a04d0bc [host] dxgi: fix packed texture height calculation 2024-01-27 10:56:23 +11:00
Geoffrey McRae
2316a5e64d [host] dxgi: ensure 24-bit packed output is properly aligned 2024-01-27 10:11:01 +11:00
Geoffrey McRae
c5cbb8aa46 [host] dxgi: enable 24-bit mode by default
General community feedback with this enabled has been positive and we
can now transition to enabling by default.
2024-01-27 02:28:09 +11:00
Geoffrey McRae
f05151c9a6 [host] nvfbc: fix compilation with new debug code 2023-12-07 16:33:54 +11:00
Geoffrey McRae
5d4c1d348c [all] refactor cpuInfo function names 2023-11-19 01:22:09 +11:00
Geoffrey McRae
accf300c6c [host] dxgi: fix failure to reset texture state on fast restarts 2023-11-15 17:31:37 +11:00
Geoffrey McRae
929e88b9d3 [all] provide conditional path optimization hints to the compiler 2023-11-12 18:26:08 +11:00
Geoffrey McRae
96b5892c31 [host] app: prevent possible null deref and resource leak 2023-11-12 06:44:20 +11:00
Geoffrey McRae
b14aad7118 [host] dxgi: remove uneeded variable + minor cosmetic changes 2023-11-12 06:36:04 +11:00
Geoffrey McRae
7321ca6768 [host] windows: fix stdout/stderr resource leak 2023-11-12 06:20:29 +11:00
Geoffrey McRae
cd6485f2ed [host] downsample: fix resource leak on failure 2023-11-12 05:59:47 +11:00
Geoffrey McRae
7bcad37568 [host] platform: Close the exitEvent when done 2023-11-12 05:59:14 +11:00
Geoffrey McRae
ba8075a9fd [host] app: fix unchecked return value 2023-11-11 20:50:42 +11:00
Geoffrey McRae
3bad3837b4 [host] fix copy-paste error 2023-11-11 20:47:36 +11:00
Geoffrey McRae
084ebe5035 [host] dxgi: fix potential buffer out of bounds access 2023-11-11 20:41:10 +11:00
Geoffrey McRae
d480b674ca [host] dxgi: fix invalid array access via wrong variable 2023-11-11 20:37:58 +11:00
Geoffrey McRae
10e30eec57 [host] dxgi: fix possible null dereference 2023-11-11 20:36:53 +11:00
Geoffrey McRae
503efdd0d8 [host] dxgi: fix failure to call FreeLibrary for d3d12 2023-11-11 20:31:53 +11:00
Geoffrey McRae
27f3af8221 [host] nvfbc: cosmetics 2023-11-11 09:08:56 +11:00
Geoffrey McRae
cb849b287c [hosts] nvfbc: exit loop early if ystart is > then dataHeight 2023-11-11 09:08:08 +11:00
Geoffrey McRae
0057cf5377 [host] nvfbc: add additional debug output 2023-11-10 08:01:03 +11:00
Geoffrey McRae
138a0aee53 [all] update cmake minimum version 2023-11-10 06:28:05 +11:00
Geoffrey McRae
7a30736ac4 [host] linux: fix compilation (untested) 2023-11-10 06:28:05 +11:00
Geoffrey McRae
d592f13f88 [host] all: don't combine the downsampler rules 2023-11-10 06:28:05 +11:00
Geoffrey McRae
905fea57f0 [host] nvfbc: fix stride for odd resolutions in 24-bit mode 2023-11-10 06:28:05 +11:00
Geoffrey McRae
8605df8c8d [host] nvfbc: fix damage copy when operating in 24bpp 2023-11-10 06:28:05 +11:00
Geoffrey McRae
86e8e99107 [all] add initial support for RGB24-bpp support 2023-11-10 06:28:05 +11:00
Geoffrey McRae
5bba4dfab5 [host] nvfbc: fix incorrect metadata when resampling is enabled 2023-11-10 06:28:05 +11:00
Geoffrey McRae
a455078e0f [host] dxgi: dont alter the damage rect array when scaling 2023-11-10 06:28:05 +11:00
Geoffrey McRae
f8586fd063 [host] dxgi: fix RGB24 damage rect rounding bug 2023-11-10 06:28:05 +11:00
Geoffrey McRae
f991f994f0 [host] dxgi: rename cpu to tex 2023-11-10 06:28:05 +11:00
Geoffrey McRae
772e0e3b4a [host] dxgi: fix d3d11 invalid memory allocation for backend struct 2023-11-10 06:28:05 +11:00
Geoffrey McRae
fd79bb1333 [host] dxgi: add option to enable RGB24 packing support 2023-11-10 06:28:05 +11:00
Geoffrey McRae
d6519c4486 [host] dxgi: remove unused define 2023-11-10 06:28:05 +11:00
Geoffrey McRae
9fefbae749 [host] dxgi: make dxgi structs private again 2023-11-10 06:28:05 +11:00
Geoffrey McRae
fa561c121e [host] dxgi: move and document dxgi_* exposed functions for backends 2023-11-10 06:28:05 +11:00
Geoffrey McRae
c2e3c37bab [host] dxgi: remove no longer used member for copy backends 2023-11-10 06:28:05 +11:00
Geoffrey McRae
54bd08c3cb [host] dxgi: decouple backends from the DXGI main struct 2023-11-10 06:28:05 +11:00
Geoffrey McRae
eb2796d40b [host] dxgi: move the backend interface into a separate header 2023-11-10 06:28:05 +11:00
Geoffrey McRae
748c9c177e [dxgi] increase the comRef global count 2023-11-10 06:28:05 +11:00
Geoffrey McRae
cc48257aeb [dxgi] d3d12: fix incorrect mapping range 2023-11-10 06:28:05 +11:00
Geoffrey McRae
3838e1f996 [host] dxgi: fix the return status of the downsampler 2023-11-10 06:28:05 +11:00
Geoffrey McRae
881aa9e179 [host] dxgi: fix the d3d12 copy backend 2023-11-10 06:28:05 +11:00
Geoffrey McRae
9a2638bfa0 [host] dxgi: fix unbalanced scope pop 2023-11-10 06:28:05 +11:00
Geoffrey McRae
8d7d5ba8fd [host] dxgi: fix comRef leak in the downsampler 2023-11-10 06:28:05 +11:00
Geoffrey McRae
09b6fee360 [host] dxgi: fix HDR content downsampling 2023-11-10 06:28:05 +11:00
Geoffrey McRae
561c45bcb9 [host] dxgi: fix support for non 24-bit BGR formats 2023-11-10 06:28:05 +11:00
Geoffrey McRae
5f613b09d6 [host] dxgi: implement downsampling to arbitrary sizes 2023-11-10 06:28:05 +11:00
Geoffrey McRae
30c577beeb [host] all: make the downsample rule matching common 2023-11-10 06:28:05 +11:00
Geoffrey McRae
6c7f3c4197 [host] nvfbc: make the downsampleParser available outside of NvFBC 2023-11-10 06:28:05 +11:00
Tudor Brindus
ea5b6b4026 [host] DXGI: implement damage-aware RGB24 copy 2023-11-10 06:28:05 +11:00
Tudor Brindus
6329779893 [host] DXGI: rescale RGB24 texture to 3/4ths the input width
Now that data isn't packed across rows, we can decrease the amount of
texture memory we require.
2023-11-10 06:28:05 +11:00
Tudor Brindus
3106d0e3e2 [host] DXGI: stop packing data across rows
This is a precursor to allowing damage-aware RGB24 copies.
2023-11-10 06:28:05 +11:00
Tudor Brindus
d44fc36fc4 [host] DXGI: stop rescaling RGB24 texture height
For the moment, this just increases texture memory usage, but does not
affect behavior.

In a future commit, I will modify the shaders to not pack data across
rows, in order to enable damage copies.
2023-11-10 06:28:05 +11:00
Tudor Brindus
c29404eea6 [host] DXGI: fixed swapped rows and cols variables
In practice this worked out because `rows = cols`, but this will change
in future commits as I implement RGB24 damage support.
2023-11-10 06:28:05 +11:00
Geoffrey McRae
578d98fd22 [host] DXGI: initial implementation of RGB24 support
This commit breaks damage tracking and the dx12 backend and is not in
a state where it should be used by the general public.
2023-11-10 06:28:05 +11:00
Geoffrey McRae
b3879ff1d7 [host] windows: the vertex shader is common to all post-processors 2023-11-10 06:28:05 +11:00
Geoffrey McRae
1e30539fb2 [dxgi] cache the input shader resource view of the src texture 2023-10-29 21:53:48 +11:00
Geoffrey McRae
52410beea7 [host] dxgi: check for correct comRef usage 2023-10-29 20:29:14 +11:00
Geoffrey McRae
21cd380cad [host] dxgi: seperate out and implement a post processor chain 2023-10-29 20:27:17 +11:00
Geoffrey McRae
e225f66cee [host] dxgi: explicitly flush the pipeline to reduce latency 2023-10-27 22:08:33 +11:00
Geoffrey McRae
2206752b66 [host] dxgi: fix d3d12 backend resource leak
The handle is only needed so we can open the resource, once we have
it we can close the handle. We then cache the shared resource for
future reuse if possible.
2023-10-27 21:56:49 +11:00
Geoffrey McRae
0510d06c4b [host] dxgi: fix d3d12 texture sharing when in HDR 2023-10-27 21:22:00 +11:00
Geoffrey McRae
699d95818d [host] dxgi: upate d3d12 backend to use comRef 2023-10-27 21:01:44 +11:00
Geoffrey McRae
fffac35300 [host] dxgi: update d3d11 backend to make use of comRef 2023-10-27 18:44:17 +11:00
Geoffrey McRae
35b0f8edf3 [host] dxgi: allow the HDR texture to be shared with other backends 2023-10-27 18:43:26 +11:00
Geoffrey McRae
544164f637 [host] dxgi: allow the backend to shutdown before freeing comRef globals 2023-10-27 18:42:38 +11:00
Geoffrey McRae
b94166177f [host] dxgi: update to make use of comRef (part 1 of 2) 2023-10-27 17:34:34 +11:00
Geoffrey McRae
69b984aa2c [host] dxgi: add helper to manage COM object memory 2023-10-27 17:33:40 +11:00
Geoffrey McRae
47329ebd89 [host] dxgi: move utility functions into util.c 2023-10-27 11:28:37 +11:00
Geoffrey McRae
5d7469d23e [host] linux: fix build with new HDR changes (untested) 2023-10-27 01:19:46 +11:00
Geoffrey McRae
b41840b010 [host] all: tell the client if HDR PQ is in use or not 2023-10-27 01:11:57 +11:00
Geoffrey McRae
200b7b732c [host] dxgi: properly convert HDR16 to HDR10
DXGI doesn't take into account the SDRWhiteLevel that has already been
applied to the monitor when it converts to HDR10 which results in clipping.
This change set implements a HLSL shader to reverse this while at the same
time converting to HDR10.

This is still not perfect but far better then doing nothing.
2023-10-26 22:57:41 +11:00
Geoffrey McRae
c5923b9b4d [host] dxgi: obtain HDR color space and monitor information 2023-10-22 17:38:42 +11:00
Geoffrey McRae
bde2eef175 [host] dxgi: fix format for HDR10 when it needs correcting 2023-10-22 04:01:51 +11:00
Geoffrey McRae
ccd0a0bcf9 [host] dxgi: use HDR10 instead of HDR16 to save bandwidth 2023-10-22 03:47:32 +11:00
Geoffrey McRae
742e41c2c3 [host] dxgi: fix HDR damage aware copy 2023-10-22 03:15:12 +11:00
Geoffrey McRae
12d051d8c0 [host] nvfbc: do not try to init on non NVIDIA hardware 2023-10-22 01:46:57 +11:00
Geoffrey McRae
a6a6b8779a [host] nvfbc: fix use of initialized variable 2023-10-22 01:21:20 +11:00
Geoffrey McRae
ad65561511 [host] app: cleanup local variables during init. 2023-10-21 22:03:22 +11:00
Geoffrey McRae
128a8938c6 [host] nvfbc: remove useless update of member 2023-10-20 22:12:42 +11:00
Geoffrey McRae
2e515657dd [all] update/add license headers 2023-10-20 15:36:34 +11:00
Geoffrey McRae
dab5618a6d [host] linux: fix compilation 2023-04-26 16:31:02 +10:00
Geoffrey McRae
99333a03c1 [host] nvfbc: fix failure to store last hdr state 2023-04-26 15:58:22 +10:00
Geoffrey McRae
45318aa653 [host] nvfbc: bump the format version when HDR status changes 2023-04-26 15:55:26 +10:00
Geoffrey McRae
f84165ac66 [host] app: report to the client if the frame is actually HDR 2023-04-26 15:48:01 +10:00
Geoffrey McRae
e4a8424fad [host] nvfbc: fix ARGB10 support
There is no performance penalty to using ARGB10 as it's still a 32-bit copy per
pixel and the nvidia driver internally handles any conversions required to make
this work for both SDR and HDR.
2023-04-19 19:52:30 +10:00
Geoffrey McRae
188f25c6bf [host] nvfbc: increase retry timeout to 1 second 2022-12-09 08:00:03 +11:00
Geoffrey McRae
8619f787b9 [host] nvfbc: retry on failure to init
@quantum has observed nvfbc under rare circumstances fail to initialize,
this adds a retry to the init with a short delay to hopefully recover
from this situation.
2022-12-08 21:24:11 +11:00
Quantum
e1ebde3cd2 [host] windows: log to stderr that logs will continue in file
This prevents users from posting the stderr as if it's the only output.
2022-12-08 21:08:07 +11:00
Quantum
f519904c38 [host] app: clarify that config file not found is not fatal
This prevents users from thinking this is the problem they are facing.
2022-12-08 21:08:07 +11:00
Geoffrey McRae
875242fe15 [host] app: improve throttleFPS logic 2022-11-07 22:56:20 +11:00
Geoffrey McRae
697bbcd6d4 [host] app: correct timer restart on lgmp corruption recovery 2022-11-07 13:36:57 +11:00
Geoffrey McRae
ecca5720a9 [host] app: ensure that rand will be random 2022-11-07 13:26:52 +11:00
Geoffrey McRae
8e706636d3 [host] app: don't stop the lgmpTimer on session recovery 2022-11-07 12:20:25 +11:00
Geoffrey McRae
97c5b8c3a7 [host] fix building under void linux
Closes #1012
2022-07-13 07:02:17 +10:00
Quantum
a8521b821e [all] cmake: standardize indentation to 2 spaces 2022-05-29 11:16:16 +10:00
Geoffrey McRae
a41ab81a90 [host] nvfbc: try all NVIDIA adapters in the system
This will allow LG to start if the VM still has a virtual device as
the primary output.
2022-05-18 16:27:17 +10:00
Geoffrey McRae
0f8c0b5fb3 [host] dxgi: fix incorrect skip logic 2022-05-18 15:59:31 +10:00