158 Commits

Author SHA1 Message Date
LibretroAdmin
a9157f975e
String cleanups (#14304)
(retroarch.c) retroarch_get_capabilities - get rid of strlcat
party in RARCH_CAPABILITIES_CPU, do simple manual assignment for
concatenation instead and NULL terminate at the end
(menu_displaylist.c) Do something about some of the unnecessarily huge
local strings of PATH_MAX_LENGTH size (can be as large as 8192)
(menu_displaylist.c) Replace some trivial strlcats / snprintfs
(D3D10/D3D11/D3D12) Strings don't need to be initialized -
strlcpy already null-terminates - get rid of some constants
2022-08-08 19:11:15 +02:00
LibretroAdmin
5739c537a2 Some CXX_BUILD fixes 2022-08-05 17:40:06 +02:00
libretroadmin
9dd1fb895b - Turn rotation arrows static where possible
- Don't call matrix_4x4_rotate_z - inline the code instead
2022-07-04 15:28:54 +02:00
sonninnos
a0bfdcce3b
(D3D11/12) Make waitable swapchains optional (#14074) 2022-06-19 21:25:37 +02:00
sonninnos
ca0b3095e8
(D3D11/12) Make low-latency optional (#14073) 2022-06-19 14:14:34 +02:00
sonninnos
31a43b9390 (D3D11/12) Reduce lag with WaitForVBlank 2022-06-14 16:49:30 +03:00
libretroadmin
8ec1f3294e (D3D10/11/12) Miscellaneous corrections/safety checks 2022-06-07 06:37:23 +02:00
libretroadmin
65ab04e775 (D3D11/D3D12) Prevent Griffin build failure 2022-06-07 04:30:28 +02:00
sonninnos
0bb65fb39c (D3D11/12) Add waitable swapchains and max frame latency option 2022-06-07 00:25:03 +03:00
libretroadmin
8b5b1ce96d (D3D) Get rid of unnecesary inline functions 2022-06-04 23:14:15 +02:00
libretroadmin
85ca66bfad (D3D) Move d3d{}_release_texture out of d3d{}_init_texture 2022-06-04 21:31:43 +02:00
libretroadmin
4dc08fad5c (D3D) Miscellaneous cleanups 2022-06-04 19:16:14 +02:00
libretroadmin
18bebe0c73 (D3D12) Small cleanups - less implicit memsets 2022-06-04 06:55:34 +02:00
libretroadmin
05797eb6b8 (D3D12) Move functions over to files that need it 2022-06-04 06:02:50 +02:00
libretroadmin
7896341dfc Revert "Move d3d_input_driver to win32_common and rename it win32_input_driver"
This reverts commit 201eeae7f1cba8e29c1f14c6c7fec8d330db1d9e.
2022-05-17 12:34:12 +02:00
libretroadmin
bfa627737e (D3D/Vulkan) Try to prevent implicit memsets 2022-05-16 21:37:02 +02:00
libretroadmin
201eeae7f1 Move d3d_input_driver to win32_common and rename it win32_input_driver 2022-05-16 08:03:13 +02:00
twinaphex
fc2b3f1ed9 (D3D) Cleanups 2022-04-24 12:59:23 +02:00
twinaphex
6a537a656d (D3D10/D3D11/D3D12) Get rid of save_hlsl codepath when loading
shaders (and they fail), or debug mode
2022-04-24 12:01:36 +02:00
MajorPainTheCactus
f3bda542d6 Fixed crash when using stock shader and HDR and previous optimisation 2022-03-15 05:44:07 +01:00
MajorPainTheCactus
32b8560858 Removed redundant copy of buffer in HDR mode if the shader has already a HDR format i.e R10G10B10A2 2022-03-15 05:44:07 +01:00
twinaphex
460f5e745d Silence some MSVC 2019 code analysis warnings 2022-03-05 14:39:56 +01:00
MajorPainTheCactus
1a228a4e78
Added HDR support to Vulkan driver (#13456) 2022-01-08 13:22:34 +01:00
Nikos Chantziaras
be650a790c
Add option for showing the overlay behind the menu (#13360)
* Add option for showing the overlay behind the menu

This commit lays the groundwork for this option. Support for this option
in the video drivers themselves is going to be added in later commits.

* gl1: Add overlay behind menu support

* gl2: Add overlay behind menu support

* gl3: Add overlay behind menu support

* vulkan: Add overlay behind menu support

* ctr: Add overlay behind menu support

* d3d9: Add overlay behind menu support

* d3d10: Add overlay behind menu support

* d3d11: Add overlay behind menu support

* d3d12: Add overlay behind menu support

* CHANGES.md: overlay behind menu

Co-authored-by: MrHuu <MrHuu@users.noreply.github.com>
Co-authored-by: Tony <45124675+sonninnos@users.noreply.github.com>
2021-12-26 04:56:44 +01:00
MajorPainTheCactus
9151326b73
Added support for HDR shaders - if we detect a shader that uses SLANG_FORMAT_A2B10G10R10_UNORM_PACK32 or SLANG_FORMAT_R16G16B16A16_SFLOAT as the format for the last render target in the shader chain AND hdr is switched on then this disables the internal HDR shader and allows the shader chain to define an inverse tonemapper and hdr10 shader. The first use of this is for my hdr shader crt\crt-sony-pvm-4k-hdr.slangp - submitted seperately (#13390) 2021-12-22 02:17:17 +01:00
Tony
09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
Francisco Javier Trujillo Mata
3bbfcf7b39 Adding to get_video_output_size 2 parameters for additional info 2021-10-04 23:53:55 +02:00
twinaphex
6f36e0a2dd Rename GL driver files + add some comments to D3D drivers - gl_core
becomes gl3, gl becomes gl2, etc
2021-09-26 14:16:09 +02:00
twinaphex
2a4862ad8d Rename mimpapgen_sm5.h to mipmapgen_sm5.h 2021-09-26 13:30:50 +02:00
MajorPainTheCactus
3c6bdfd0d8
Fixed numerous issues with HDR (#12979)
* Fix for warning and fix for incorrect comment

* Fixed contrast to be more correct - now scales from 0-10 linearly and behaves more the way you'd expect it to - changed name to ditch legacy settings users may have
Added ability to skip inverse tonemapper to the shader via the constant buffer using 'inverse_tonemap' - set to 0.0f to skip
Fixed potential bug when swapping between hdr and sdr and the bit depth not being set correctly
Fixed dx11's blend, rasterizer and topology states not being set to the sames when using hdr and leaving the menu - caused issues with PCSX2's Shadow of the Colossus
Added numerous helper functions to help create the correct values to colour the UI - normally the white UI elements should be rendered at paper white not max brightness for various reasons

* Fix stylistic issues - * Don't use camelcase for variables and function names * Use '(void)' for function declarations instead of () in C code * Declare variables at the top of a function or code block * Make sure functions that return a value always have a default return path that is not encapsulated by an else block * Use more unique names for retro_math functions which are less likely to overlap with other libraries' function symbols

Co-authored-by: twinaphex <libretro@gmail.com>
2021-09-13 16:54:50 +02:00
twinaphex
f597138827 Cleanups 2021-09-04 21:40:37 +02:00
Autechre
7b9cbc08d7
Add HDR support for D3D12 (rebased PR from MajorPainTheCactus) (#12917)
* Add HDR support

* Attempt to fix Mingw build and Metal builds

* (D3D12) Fix relative header includes

* Add missing hdr_sm5.hlsl.h

* (d3d12_common.c) Some C89 build fixes

* Fix MSVC build

* - Attempt to fix build on mingw/msys unix with dirty hack
- Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio -
the define was seen as an error and was causing the first pipeline
to error out
- Make sure we manually set handle of backBuffer to NULL

* Moving the release of the texture above the freeing of desc.srv_heap
and desc.rtv_heap solves the hard crashes on teardown/setup in RA -
it was crashing hard in d3d12_release_texture before

* Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now
because of several things that are Windows desktop-specific right now
(GetWindowRect)

* Add dirty GUID hack - should work for both mingw/msys on Windows/Linux
as well as MSVC/Visual Studio (hopefully)

* Change HAVE_D3D12_HDR to HAVE_DXGI_HDR

* Move away from camelcase named variables

* Fix RARCH_ERR logs - they need a newline at the end

* d3d12_check_display_hdr_support - make it return a bool on return
and set d3d12->hdr.support and d3d12->hdr.enable outside of the
function

* (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and
move it to dxgi_common.c instead

* (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and
rename it dxgi_swapchain_color_space

* (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and
rename it dxgi_set_hdr_metadata

* (DXGI) dxgi_check_display_hdr_support - better error handling?

* Fix typo

* Remove video_force_resolution

* (D3D12) Address TODO/FIXME

* (D3D12) Backport
c1b6c0bff2
- Fixed resource transition for present when HDR is off
Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader

* Move d3d12_hdr_uniform_t to dxgi_common.h and
rename it dxgi_hdr_uniform_t

* (D3D11) Add HDR support

* Add TODO/FIXME notes

* Cache hdr_enable in video_frame_info_t

* Update comment
2021-09-03 06:15:25 +02:00
twinaphex
e596bf7925 Buildfix for previous commit 2021-08-02 16:19:26 +02:00
twinaphex
2af9441d35 Create separate wnd_proc functions for winraw 2021-08-02 16:14:58 +02:00
twinaphex
78341e5824 (D3D12) Fix some header includes 2021-07-30 15:18:56 +02:00
twinaphex
ab9a4a95b1 (D3D12) Fix some header includes - probably a mistake that wiiu_dbg.h
was added to the d3d12.c driver
2021-07-30 15:16:14 +02:00
sonninnos
917fb1f796 D3D12 Updates:
- Relocated 'd3d12_gfx_sync()'
- Fixed swap interval option
- Cleanups
2021-06-18 21:54:36 +03:00
Tony
3647bdef0f
(D3D) Logging + dupe code cleanups (#12501) 2021-06-09 06:33:14 +02:00
JustMeDaFaq
462cedb654
Update d3d12.c 2021-06-07 12:04:53 +02:00
sonninnos
04962e1741 (D3D) Add common window title for D3D9+ 2021-06-06 22:24:47 +03:00
sonninnos
8584b122e1 (D3D11+12) Allow fastforward in fullscreen 2021-06-04 04:31:11 +03:00
HyperspaceMadness
0c526b6498 Shaders Load Refactor and Fix Referenced Texture Loading
Partial update to work with shaders directly

More Edits

More changes

more shader fixes

More Fixes Compiling, reference load still wrong

Added Feedback & things are working

Logging Fixes

Log Fix

More Fixes

Added Feedback Logging

Fixes for file pathing in Linux

Fix GLCore and Crash in QT Saving

Code Cleanup

Removed Unused Function filepath.c

Code Cleanup
2020-12-26 21:09:27 -05:00
aliaspider
16f997172f (D3D12) allocate rt_view descriptors for feedback render targets too. 2020-12-20 08:08:04 +01:00
aliaspider
bf2adda421 (D3D12) move D3D12SignalCommandQueue to d3d12_gfx_sync. 2020-12-20 07:13:11 +01:00
twinaphex
38ce3927ae (D3D10/11/12) Increase sprite capacity, we need this so that
the hardware rendered menu drivers don't glitch out
2020-12-17 08:31:06 +01:00
twinaphex
44b7234756 Move cheat_manager and state_manager to root folder 2020-10-15 05:29:20 +02:00
twinaphex
4d1cfa9c41 Make the 'raw' versions the generic function for the message loop
callback - this way it's reused for SDL2 input driver too
2020-08-28 02:55:39 +02:00
twinaphex
32279c3a70 Split up wnd_proc_common_internal into two - one for dinput,
one for raw
2020-08-28 02:21:13 +02:00
twinaphex
2a9915f80d (D3D) Buildfix 2020-08-08 19:12:01 +02:00
twinaphex
ade58fc8b6 (UWP) Buildfix 2020-08-08 18:17:40 +02:00