Commit Graph
82 Commits
Author SHA1 Message Date
Codex bd12490d79 win32: preserve math calls in strict C89 builds
MinGW hides float math declarations under strict C89 although its runtime supplies the functions. Force-include scoped declarations in the Win32 C89 lane so viewport rounding and matrix math retain their float return ABI. Keep strict C89 diagnostics; the GNU89 alternative accepts inline and is not used.

Give the three bundled D3DKMDT rotation helpers internal linkage to avoid duplicate definitions across C89 translation units. Add actual runtime and two-unit linkage checks plus seven rejected C99 syntax probes.

Validated through local CI on native Windows/GDB and MinGW/Wine, a fresh complete C89 frontend build, and twelve actual HEVC movie-window frames against independent FFmpeg RGB patches: 796 points, maximum channel error 3, no failures. The previous presentation had 632 failing points.
2026-10-20 03:54:44 +02:00
Codex 4f79215432 Add Vulkan AV1 decode declarations and capability probe
Import the AV1 StdVideo and decode extension declarations from Vulkan-Headers v1.4.328. Query Main 8/10-bit capabilities with and without film grain before implementing the device adapter, and document native RTX 5090 limits without advertising AV1 playback.
2026-10-15 22:34:46 +02:00
Codex 469325a792 Decode VP9 Profile 0 and 2 with Vulkan Video
Negotiate the VP9 extension and feature in both device-creation paths, preserving explicit core disable requests. Backport the required VP9 definitions from Vulkan-Headers v1.4.328.

Register a VP9 backend with the existing hardware session and reuse Vulkan NV12/P010 output leases and sampled imports. Preserve effective segmentation/filter state, named-reference aliases and per-slot color metadata. Retain the DPB-to-output copy and capability-based fallback.

Add portable picture and negotiation tests, plus optional native IVF/reference-plane and RGBA comparisons covering show-existing replay, backpressure, retained frames after close and sampled-import fallback.
2026-10-15 19:18:48 +02:00
libretroadmin 1723e48ace gfx/include/vulkan: update headers to 1.3.275, add vk_video
The video decode extensions (VK_KHR_video_queue, video_decode_queue,
video_decode_h264) and their codec std headers. C++ comments turned
into C89 ones.
2026-10-12 10:24:08 +02:00
libretroadmin 832dde7828 d3d9, dxsdk, mingw_syntax_check: C89 for the d3d9 drivers, and the check
The d3d9 Cg and HLSL drivers assign their shader constant vectors, the
rotated-quad corners and the texcoord vertex element after the
declarations instead of initialising them from runtime values, which C89
does not allow; every value and the order it is set in are unchanged.
The bundled d3dcompiler.h stands in for the Windows SDK header and is
marked a system header for GCC, so its C++ comments are not held to the
project's pedantic C89 checks.

tools/mingw_syntax_check.sh's C89 pass defines HAVE_SCREENSHOTS, as the
linux-c89 build does, and gives Windows-only translation units the Win32
feature set of the first pass, the only one they are built with: without
it the pass found wnd_proc_d3d_common undeclared in every d3d driver and
the screenshot settings missing in task_screenshot.c. Over the whole
tree eleven translation units go from failing to clean and none from
clean to failing.
2026-09-11 12:48:01 +02:00
zoltanvb c685d95221 Remove Raspberry Pi userland (#15972)
Userland was added at: https://github.com/libretro/RetroArch/pull/8132
However, its only use was with CRTSwitchRes together with VideoCore.
Over the times, the legacy VideoCore drivers have lost usage as
nowadays Mesa supports the VideoCore IV chip in RPi 0..3, and
RPi 4 and/or 64-bit was never supported.

Option is kept to use the legacy drivers, but it is now utilized
from the OS.
2026-06-25 08:53:17 +02:00
U-DESKTOP-SPFP6AQ\twistedtechre 0a7758076d Silence VS2019 warnings 2026-05-01 11:11:28 +02:00
sonninnos 1119982cea Win32: Add d3dkmt + Scanline Sync (#18974)
* Win32: Add d3dkmt + Scanline Sync

* NTDDI versioning attempt

* Header adjustments
2026-04-24 23:43:28 +02:00
U-DESKTOP-SPFP6AQ\twistedtechre 0306e17640 dxsdk/SAL: activate compat shim on GCC/MinGW and add SAL 1 bytecount family
The existing dxsdk_sal_compat.h was gated on `_MSC_VER < 1700`, which
made the entire shim body invisible to GCC/MinGW toolchains. This
worked because mingw-w64's <sal.h> historically provided the SAL
macros the bundled DX headers reference -- but not all mingw-w64
releases are complete. MSYS2's current mingw-w64 sal.h omits the
legacy SAL 1 form `_Inout_opt_bytecount_`, which the bundled d3d11.h
references, so the MXE/MinGW cross-build of gfx/common/dx_guids.c
fails to parse d3d11.h.

Fix the gate and extend macro coverage:

 * Replace the `_MSC_VER < 1700` gate with a portable form that pulls
   in <sal.h> via `__has_include` on non-MSVC toolchains. The shim
   body then runs on every toolchain, and the per-macro `#ifndef`
   guards prevent redefinition wherever the toolchain already
   provides the macro. Net effect on MSVC 2012+ and on complete
   mingw-w64 releases: no-op. On MSVC 2003-2010 and incomplete
   mingw-w64 releases: missing macros are stubbed.

 * Add the SAL 1 underscore-prefix bytecount/ecount family
   (`_In_bytecount_[_opt_]`, `_Out_bytecount_[_opt_]`,
   `_Inout_bytecount_[_opt_]`, `_Inout_opt_bytecount_`, and the
   four `_ecount_[_opt_]` equivalents). `_Inout_opt_bytecount_`
   is the one actually observed in the MXE/MSYS2 build log; the
   siblings are added together because they commonly surface in
   the same parse cascade once any one of them fails.

 * Update the file comment to document MinGW-w64 coverage and the
   no-op behavior on MSVC 2012+.

Also propagate `#include "dxsdk_sal_compat.h"` to the bundled DX
headers that didn't already have it:

 * gfx/include/dxsdk/d3d10.h, d3d10_1.h, d3d11.h, d3d11shader.h,
   d3d12.h, d3d12shader.h, d3dcompiler.h: add the shim include at
   line 1, ahead of the MIDL-generated preamble.

The dxgi1_*.h, d3dcommon.h, and dxgi.h headers already got this
in an earlier commit; d3d8.h and d3d9.h are not bundled.

Downstream effect:
 * MXE/MSYS2 mingw-w64 cross-build: resolves the
   `unknown type name '_Inout_opt_bytecount_'` error in
   gfx/common/dx_guids.c's transitive include of d3d11.h.
 * MSVC 2003-2010: unchanged (every new stub is #ifndef-guarded,
   and the SAL 2 additions from the prior dxgi patch remain intact).
 * MSVC 2012+: unchanged (<sal.h> provides everything, stubs no-op).
2026-04-16 16:34:41 +02:00
U-DESKTOP-SPFP6AQ\twistedtechre be45b30a10 dxsdk: extend SAL shim for DXGI headers
Commit e8191ce ("Add this") routes griffin.c's d3dcompiler_common.c
inclusion through an HAVE_D3D9+HAVE_HLSL arm and redirects
dxgi_common.h to the bundled <dxsdk/dxgi1_6.h>. On legacy MSVC
toolchains (2003-2010) this surfaces a new SAL-annotation parse
cascade: dxgi1_2.h through dxgi1_6.h reference SAL 2 macros that
those toolchains do not know
2026-04-16 16:01:37 +02:00
U-DESKTOP-SPFP6AQ\twistedtechre a1d4129408 dxsdk: add SAL compatibility shim for MSVC 2003 through 2010
The bundled DirectX headers in gfx/include/dxsdk/ are modern Windows
8.x/10 SDK headers and use SAL annotations throughout their function
prototypes. These annotations come in two generations:

  * SAL 1 (double-underscore): __in, __out, __inout, __in_ecount,
    __out_bcount, __deref_out, etc.
  * SAL 2 (leading underscore + trailing underscore): _In_, _Out_,
    _Inout_, _In_reads_(s), _Out_writes_bytes_(s), _COM_Outptr_,
    _Always_(x), _Outptr_opt_result_maybenull_, etc.

Older Microsoft toolchains ship incomplete or nonexistent sal.h:

  * MSVC 2003 (_MSC_VER 1310): no sal.h at all. Both SAL 1 and SAL 2
    macros are undefined.
  * MSVC 2005 (_MSC_VER 1400) and MSVC 2008 RTM (_MSC_VER 1500): sal.h
    has SAL 1 only.
  * MSVC 2008 SP1 and MSVC 2010 (_MSC_VER 1600): sal.h ships a partial
    SAL 2 set (_In_, _Out_, _Inout_, etc.) but is missing the
    buffer-size, COM-outptr, and wrapper families.
  * MSVC 2012+ (_MSC_VER >= 1700): full SAL 2 in sal.h.

Without definitions for these macros, the preprocessor treats them as
unknown identifiers and every function declaration that uses one fails
to parse, producing cascades like:

  error C2143: syntax error : missing ')' before 'type'
  error C2081: '_COM_Outptr_' : name in formal parameter list illegal

Add gfx/include/dxsdk/dxsdk_sal_compat.h which stubs out the missing
SAL 1 and SAL 2 macros to empty (or to a pass-through for wrapper forms
like _Always_(x) / _When_(c,x)) so declarations using them parse as
plain C. The shim is structured in four tiers:

  * Skip the whole thing on MSVC 2012+ via _MSC_VER < 1700 gate.
  * Skip #include <sal.h> on MSVC 2003, where the header does not
    exist, via a _MSC_VER >= 1400 gate.
  * Stub the SAL 1 family, guarded per-macro with #ifndef so MSVC 2005
    through 2010 (which already have them) leave them untouched and
    MSVC 2003 gets working definitions.
  * Stub the SAL 2 family the same way, filling in whatever the
    toolchain is missing without redefinition warnings.

Every macro is wrapped in #ifndef to avoid C4005 redefinition warnings
on toolchains that ship a partial SAL set.

Include the shim from the three bundled headers that tripped MSVC 2008
in griffin builds:

  * gfx/include/dxsdk/d3dcommon.h
  * gfx/include/dxsdk/d3d11shader.h
  * gfx/include/dxsdk/d3dcompiler.h

The shim's outer include guard makes repeat inclusion free, so if
additional DX headers surface the same errors in future build
configurations they can be added with a one-line #include.

This is a build-only fix. The stubs discard static-analysis
information, which older MSVC versions could not consume anyway.
No behavior change on any supported toolchain.
2026-04-16 14:39:27 +02:00
U-DESKTOP-SPFP6AQ\twistedtechre 55c01f9657 Remove D3DX/XNA header files 2026-04-12 15:55:38 +02:00
U-DESKTOP-SPFP6AQ\twistedtechre 1ea6679492 Remove d3dx header files 2026-04-11 17:56:04 +02:00
libretroadmin b5e767acaa Remove if 0 2025-11-14 19:05:13 +01:00
libretroadmin d821ce1062 Some UCRT64 buildfixes 2025-07-20 06:19:58 +02:00
LibretroAdmin 25546f864a Revert "Move code around"
This reverts commit a018f935d0.
2025-07-18 18:16:27 +02:00
LibretroAdmin b156ce2a42 Revert "Get rid of Inout_opt_bytecount"
This reverts commit 40671b293e.
2025-07-18 18:16:19 +02:00
LibretroAdmin 40671b293e Get rid of Inout_opt_bytecount 2025-07-18 17:46:40 +02:00
LibretroAdmin a018f935d0 Move code around 2025-07-18 17:24:46 +02:00
Eric Warmenhoven 76026398ad Update Vulkan headers to v1.1.130 (#16952) 2024-09-02 08:39:44 -07:00
libretroadmin afc9cb509a CXX_BUILDFIX buildfixes 2024-07-20 19:42:45 +02:00
rt001-hub 5e45b2330b Update pixman-private.h (#16516)
patch to fix build issue with musl
https://lore.kernel.org/buildroot/[email protected]/
2024-05-13 07:29:50 -07:00
aerisarnandGabriel Morazán 8b1e4a1ad0 MESA UWP Integration (#16285)
* [WINRT] Enable logging on __WINRT__ and bypass verbosidy in debug

* [UWP] wrong configuration prevents GLES to compile, common functions defines GL symbols

* [UWP] configure project to allow OPENGL on default configuration and copy MESA DLLs into UWP release

* [UWP] add MESA headers

* [UWP] add MESA EGL.lib needed for GLES context. However HAVE_OPENGL is better as GL cores use desktop version, so this is left for reference and to make the solution build with HAVE_OPENGLES

* [UWP] UWP is missing some GDI function definitions, implemented into MESA Gallium

* [UWP] Configure Release project too

* [UWP] Add mesa alpha-2 release dlls

* [UWP] allow griffin and vide_driver to have an OPENGL context

* [UWP] allow wgl context to work with mesa under WINRT

* [UWP] BUG: have to modify height/width getters and align them to MESA because the screen resolution is not right in gl context. Pending further investigation

* [UWP] fix ANGLE build

* [UWP] remove duplicate import code.

* (UWP) Cleanup filters file

* MESA screen destroy fix and Yabasanshiro hack. Align to alpha-2-hack tag

---------

Co-authored-by: Gabriel Morazán <[email protected]>
2024-03-02 09:36:17 -08:00
LibretroAdmin 5739c537a2 Some CXX_BUILD fixes 2022-08-05 17:40:06 +02:00
Autechre 3d1f01fecc Cg rewrite (#13871)
* (D3D9 Cg) rewrite/cleanups

* Buildfixes
2022-04-22 05:39:14 +02:00
Keith BowesandMaxime Gauduin bbfcecfab0 Fix building against FFmpeg 5.0 (#13611)
Co-authored-by: Maxime Gauduin <[email protected]>
2022-02-18 18:40:54 +01:00
twinaphex 8fa1f998c5 Move d3d9 headers to gfx/include/d3d9 2021-09-26 12:49:53 +02:00
twinaphex c6b325e4d6 Add more headers 2019-12-07 07:17:21 +01:00
twinaphex df588ca422 (ANGLE) Move headers to gfx/include/ANGLE 2019-12-07 07:09:49 +01:00
twinaphex 17a161afa2 Add missing header 2019-12-07 07:04:26 +01:00
twinaphex 94f82ece4e Add more required headers 2019-12-07 07:01:11 +01:00
twinaphex 1aaf933a1a Add EGL headers 2019-12-07 06:55:16 +01:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea 4c56167446 Convert to linux line endings. 2019-02-03 15:43:42 -08:00
twinaphex 31a5f72acf Add 10.7 ifdef 2019-02-02 18:04:41 +01:00
alphanu1 c43a93e544 Adding userland for RPi 2019-01-30 20:47:36 +00:00
orbea e062b98088 Remove trailing blank lines.
find . -type f -exec sed -i '${/^[[:space:]]*$/d;}' {} \+
2019-01-17 19:39:38 -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
twinaphex 96e1b862f6 (Vulkan) Update headers - use C comments 2018-05-13 21:42:02 +02:00
Stuart Carnie 0a4ff225be Update Vulkan 2018-05-13 21:35:18 +02:00
aliaspider 5549b136c2 (msvc) CXX_BUILD + griffin fixes. 2018-02-05 00:25:03 +01:00
twinaphex 8e96700f0f (D3D8/D3D9) Update headers to work with C89 2018-02-03 16:50:26 +01:00
twinaphex 5d2b7ce32f (D3D8 headers) Start making this C89-compatible 2018-02-03 15:29:56 +01:00
twinaphex 0336c2f975 (Headers) Make Cg/D3D9 X headers C89-compatible 2018-02-03 15:18:19 +01:00
twinaphex 0b4ccf25e7 Revert "* d3d11.c - minor cleanups for C89"
This reverts commit fa458b2f5c.
2018-02-03 14:48:34 +01:00
twinaphex fa458b2f5c * d3d11.c - minor cleanups for C89
* C89 build fixes for D3D9X headers
2018-02-03 14:01:32 +01:00
twinaphex 178730891d - Silence more warnings
- Don't include d3dx headers when including cgD3D9
2018-02-03 13:11:31 +01:00
twinaphex 5328ce7375 Cleanups to headers 2018-01-26 04:02:22 +01:00
twinaphex 0e363164b1 Attempt to get further with D3D12 for mingw - now compiles
but doesn't link yet
2018-01-24 00:14:26 +01:00
twinaphex d387cfbfbe Add include/dxsdk 2018-01-23 23:40:17 +01:00