Skip to content

gdk: Update to GDK April 2026 Update 3 - #16134

Open
TheSpydog wants to merge 3 commits into
libsdl-org:mainfrom
TheSpydog:gdk-upgrade
Open

gdk: Update to GDK April 2026 Update 3#16134
TheSpydog wants to merge 3 commits into
libsdl-org:mainfrom
TheSpydog:gdk-upgrade

Conversation

@TheSpydog

Copy link
Copy Markdown
Collaborator
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

SDL currently targets the October 2023 GDK, which is no longer allowed for Xbox submissions.

It's still possible to use the existing Visual Studio project with newer GDK versions, but not for much longer; the build system relies heavily on the "old layout" of the GDK install directory, which is being fully removed and replaced as of the upcoming October 2026 GDK update. When using SDL with the "new layout", the platform include paths, library paths, and even shader compiler paths are no longer functional.

This PR updates the VisualC-GDK project to target the latest GDK version as of the time of this writing (April 2026) with support for the new layout. This should hopefully future-proof the build system for a few years at least.

I also fixed a C++ compile error in SDL_gpu_d3d12.c and aligned all shader compiler invocations to use quoted paths.

WinGDK is happy with these changes, but I'm marking this as a draft until I can do some Xbox testing.

@TheSpydog

Copy link
Copy Markdown
Collaborator Author

The test applications are now running correctly on all configurations of Gaming.Desktop, XboxOne, and Scarlett.

In addition to some misc cleanup, my latest push also makes SDL automatically copy all of its GDK dll dependencies into the build folder with it, which saves applications from having to hunt for them and hook them up into their projects manually. The docs have been updated accordingly.

@TheSpydog
TheSpydog marked this pull request as ready for review August 11, 2026 03:05
@madebr

madebr commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Has the gdk job run on ci?

@TheSpydog

Copy link
Copy Markdown
Collaborator Author

Has the gdk job run on ci?

It has not. Is there something special I need to do to kick that off?

We will probably need to update the setup script and workflow file to accommodate the new GDK version, though I'm not sure what that process involves.

@madebr

madebr commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

has not. Is there something special I need to do to kick that off?

We will probably need to update the setup script and workflow file to accommodate the new GDK version, though I'm not sure what that process involves.

The GitHub action downloads, extracts and creates a Directory.Build.props file with the minimum amount of variables needed for GDK MSBuild. This was done because installation was (is?) very slow on ci.

I see there still is a ExtractXboxOneDKs.ps1 script.
What remains is checking what variables MSBuild needs:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VCTargetsPath>{ vc_targets_path }\\</VCTargetsPath>
<VCTargetsPath16>{ vc_targets_path16 }\\</VCTargetsPath16>
<VCTargetsPath17>{ vc_targets_path17 }\\</VCTargetsPath17>
<BWOI_GDK_Path>{ self.gaming_grdk_build_path }\\</BWOI_GDK_Path>
<Platform Condition="'$(Platform)' == ''">Gaming.Desktop.x64</Platform>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<XdkEditionTarget>{ self.gdk_edition }</XdkEditionTarget>
<DurangoXdkInstallPath>{ durango_xdk_install_path }</DurangoXdkInstallPath>
<DefaultXdkEditionRootVS2019>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2019\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</DefaultXdkEditionRootVS2019>
<XdkEditionRootVS2019>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2019\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</XdkEditionRootVS2019>
<DefaultXdkEditionRootVS2022>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2022\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</DefaultXdkEditionRootVS2022>
<XdkEditionRootVS2022>$(DurangoXdkInstallPath)\\{self.gdk_edition}\\GRDK\\VS2022\\flatDeployment\\MSBuild\\Microsoft\\VC\\{self.vs_toolset}\\Platforms\\$(Platform)\\</XdkEditionRootVS2022>
<Deterministic>true</Deterministic>
<DisableInstalledVCTargetsUse>true</DisableInstalledVCTargetsUse>
<ClearDevCommandPromptEnvVars>true</ClearDevCommandPromptEnvVars>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'Gaming.Desktop.x64'">
<ClCompile>
<AdditionalIncludeDirectories>{ additional_include_directories };%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>{ additional_library_directories };%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>

(and also find out how to manually add MSBuild files for Visual Studio)

@flibitijibibo

Copy link
Copy Markdown
Collaborator

I guess the big question is "how do we start the job," as I was expecting it to just run... is there a syntax we should be adding to get CI to run specific targets?

@madebr

madebr commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I guess the big question is "how do we start the job," as I was expecting it to just run... is there a syntax we should be adding to get CI to run specific targets?

It's not possible to run the GDK job in this pr, but you can run it on your fork by adding [sdl-ci-filter *gdk*] to your last commit message. The filter is a glob matching the key of the job specs, and the various ci commands are documented here.

@TheSpydog

Copy link
Copy Markdown
Collaborator Author

Okay, it took 17 iterations on a separate branch, but I finally got the CI scripts updated for the new GDK version. The diff is pretty substantial since there was a lot that got changed between the June 2024 GDK and now.

@TheSpydog
TheSpydog requested a review from madebr August 14, 2026 20:07
@madebr

madebr commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The changes look good and the action appears to have run successfully.

Okay, it took 17 iterations on a separate branch, but I finally got the CI scripts updated for the new GDK version. The diff is pretty substantial since there was a lot that got changed between the June 2024 GDK and now.

I feel your pain. I purposefully created it as a python script (it's not embedded in a workflow yaml) and developed it on a machine with no gdk installed so I could run everything offline without ci in the loop.

Remember this pain when reading about people's CMake hate (or replace CMake with another build system). :)

Comment thread VisualC-GDK/tests/testsprite/testsprite.vcxproj Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants