18 Commits

Author SHA1 Message Date
MajorPainTheCactus
0ac542f1db
Fix for warning and fix for incorrect comment (#12944) 2021-09-06 01:16:01 +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
driver1998
a4dec6e226 d3d9: "Fix" the HLSL render chain
It won't get you very far, but at least it won't crash.
Needs HAVE_HLSL and HAVE_D3DX defines and DirectX SDK
2020-09-07 10:13:41 +08:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
aliaspider
e11209ac79 (D3D12) precompute alpha before scaling when generating mipmaps. 2018-02-09 16:33:08 +01:00
aliaspider
6fe379d978 (D3D12) add a compute shader for mipmap generation. 2018-02-09 14:57:07 +01:00
aliaspider
c0117f077b (D3D11) add the remaining menu shaders. 2018-01-25 17:07:23 +01:00
aliaspider
427003fa3b (D3D11) add ribbon shader.
- it doesn't look quite right though.
2018-01-25 09:48:07 +01:00
aliaspider
ccc9d36949 (D3D11) sample the font atlas correctly. 2018-01-25 01:58:17 +01:00
aliaspider
0cd2310a6f (D3D11) forgot to update the included shader. 2018-01-25 01:46:30 +01:00
aliaspider
812eefa601 (D3D11) add menu display driver. 2018-01-25 00:20:06 +01:00
aliaspider
840bd459df (D3D11) add a font driver. 2018-01-24 20:51:19 +01:00
aliaspider
30d5cd1a07 (D3D10/11/12) add viewport settings.
- move some common routines to video_driver.c
2018-01-24 15:00:32 +01:00
aliaspider
094196220d (D3D11/D3D12) initial video driver implementation.
- some headers from the windows 10 sdk need to be added to the include
path when targeting mingw :
   d3d11.h
   d3d11sdklayers.h
   d3d12.h
   d3d12sdklayers.h
   d3d12shader.h
   d3dcommon.h
   d3dcompiler.h
2018-01-21 04:10:45 +01:00
twinaphex
e8480a72a6 (D3D) Correct one shader 2016-08-01 22:45:07 +02:00
twinaphex
c314077f1d (D3D) Cleanups of shaders 2016-08-01 22:43:51 +02:00
twinaphex
9386fb2fa0 Move D3D9 HLSL font shader to file 2016-04-17 04:13:23 +02:00
twinaphex
e9d16655f0 Create d3d_shaders 2016-04-17 00:16:32 +02:00