From b01e59ea1d4aab22c59790412e2e38fb1300d1a4 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 7 Dec 2023 11:31:11 +0100 Subject: [PATCH] Add D2D1CompileOptions.StripReflectionData flag --- .../Attributes/Enums/D2D1CompileOptions.cs | 10 ++++++++++ src/ComputeSharp/Attributes/Enums/CompileOptions.cs | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp.D2D1/Attributes/Enums/D2D1CompileOptions.cs b/src/ComputeSharp.D2D1/Attributes/Enums/D2D1CompileOptions.cs index 9a9d439a..62d90117 100644 --- a/src/ComputeSharp.D2D1/Attributes/Enums/D2D1CompileOptions.cs +++ b/src/ComputeSharp.D2D1/Attributes/Enums/D2D1CompileOptions.cs @@ -155,6 +155,16 @@ public enum D2D1CompileOptions /// WarningsAreErrors = (int)D3DCOMPILE.D3DCOMPILE_WARNINGS_ARE_ERRORS, + /// + /// Strips the reflection data from the generated shader bytecode. The bytecode size will be smaller, but trying + /// to perform reflection on the shader will return inaccurate results. It is recommend if not reflection is used. + /// + /// + /// This flag maps to D3DCOMPILER_STRIP_REFLECTION_DATA, when passed as input to D3DStripShader. + /// For more info, see . + /// + StripReflectionData = 1 << 30, + /// /// This flag enables the support for shader linking. Specifically, when set, this flag causes the APIs from /// to compile the input shader twice: once as a full D2D1 shader, and once diff --git a/src/ComputeSharp/Attributes/Enums/CompileOptions.cs b/src/ComputeSharp/Attributes/Enums/CompileOptions.cs index 77ff9663..eb09e695 100644 --- a/src/ComputeSharp/Attributes/Enums/CompileOptions.cs +++ b/src/ComputeSharp/Attributes/Enums/CompileOptions.cs @@ -131,8 +131,8 @@ public enum CompileOptions ResourcesMayAlias = 1 << 13, /// - /// Strips the reflection data from the generated shader bytecode. The bytecode size will be significantly lower, but - /// trying to perform reflection on the shader will return inaccurate results. Recommend if not reflection is done. + /// Strips the reflection data from the generated shader bytecode. The bytecode size will be significantly smaller, but + /// trying to perform reflection on the shader will return inaccurate results. It is recommend if not reflection is used. /// /// /// This flag maps to -Qstrip_reflect.