From 5ae68e9a0fd1ae82f9c7837fbad285a6475ea28b Mon Sep 17 00:00:00 2001
From: Jakub Wasilewski <[EMAIL REDACTED]>
Date: Wed, 3 Dec 2025 13:03:56 +0100
Subject: [PATCH] Docs: GPU: Added documentation on the WinPixEventRuntime.dll
requirement to affected functions.
---
include/SDL3/SDL_gpu.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/SDL3/SDL_gpu.h b/include/SDL3/SDL_gpu.h
index 9375a72e49bd5..2653643df0c9b 100644
--- a/include/SDL3/SDL_gpu.h
+++ b/include/SDL3/SDL_gpu.h
@@ -2945,6 +2945,11 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUTextureName(
*
* Useful for debugging.
*
+ * On Direct3D 12, using SDL_InsertGPUDebugLabel will cause validation errors
+ * unless you have WinPixEventRuntime.dll in your PATH.
+ * See [here](https://devblogs.microsoft.com/pix/winpixeventruntime/) for
+ * instructions on how to obtain it.
+ *
* \param command_buffer a command buffer.
* \param text a UTF-8 string constant to insert as the label.
*
@@ -2963,6 +2968,11 @@ extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel(
* Each call to SDL_PushGPUDebugGroup must have a corresponding call to
* SDL_PopGPUDebugGroup.
*
+ * On Direct3D 12, using SDL_PushGPUDebugGroup will cause validation errors
+ * unless you have WinPixEventRuntime.dll in your PATH.
+ * See [here](https://devblogs.microsoft.com/pix/winpixeventruntime/) for
+ * instructions on how to obtain it.
+ *
* On some backends (e.g. Metal), pushing a debug group during a
* render/blit/compute pass will create a group that is scoped to the native
* pass rather than the command buffer. For best results, if you push a debug
@@ -2982,6 +2992,11 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUDebugGroup(
/**
* Ends the most-recently pushed debug group.
*
+ * On Direct3D 12, using SDL_PopGPUDebugGroup will cause validation errors
+ * unless you have WinPixEventRuntime.dll in your PATH.
+ * See [here](https://devblogs.microsoft.com/pix/winpixeventruntime/) for
+ * instructions on how to obtain it.
+ *
* \param command_buffer a command buffer.
*
* \since This function is available since SDL 3.2.0.