# SDL: GPU: fix swapchain buffer size not set on Xbox

**URL:** <https://discourse.libsdl.org/t/sdl-gpu-fix-swapchain-buffer-size-not-set-on-xbox/54846>\
**Category:** SDL Commits\
**Created:** [October 9, 2024, 2:30pm UTC](https://discourse.libsdl.org/t/sdl-gpu-fix-swapchain-buffer-size-not-set-on-xbox/54846 "2024-10-09T14:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [October 9, 2024, 2:30pm UTC](https://discourse.libsdl.org/t/sdl-gpu-fix-swapchain-buffer-size-not-set-on-xbox/54846/1 "2024-10-09T14:30:17Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/acb18e05b53638dae5995686f34e4845b29060f5>

```diff
From acb18e05b53638dae5995686f34e4845b29060f5 Mon Sep 17 00:00:00 2001
From: Daniel Ludwig <[EMAIL REDACTED]>
Date: Mon, 7 Oct 2024 19:53:06 +0200
Subject: [PATCH] GPU: fix swapchain buffer size not set on Xbox

---
 src/gpu/d3d12/SDL_gpu_d3d12.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c
index c85861c9c12a7..2e9ccf74e6fd3 100644
--- a/src/gpu/d3d12/SDL_gpu_d3d12.c
+++ b/src/gpu/d3d12/SDL_gpu_d3d12.c
@@ -6147,6 +6147,8 @@ static bool D3D12_INTERNAL_CreateSwapchain(
     windowData->swapchainComposition = swapchain_composition;
     windowData->swapchainColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
     windowData->frameCounter = 0;
+ windowData->width = width;
+ windowData->height = height;
 
     // Precache blit pipelines for the swapchain format
     for (Uint32 i = 0; i < 5; i += 1) {

```
