From c46f81c61155e8f715722eb15a61bb671a3b98ff Mon Sep 17 00:00:00 2001 From: mrange Date: Wed, 14 Sep 2022 20:25:04 +0200 Subject: [PATCH 1/3] Relax shader strictness in RELEASE mode Disables strictness and warnings as errors for custom pixel shaders in RELEASE. Windows terminal is not telling the user why the shader won't compile which makes it very frustrating for the shader hacker. --- src/renderer/atlas/AtlasEngine.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/renderer/atlas/AtlasEngine.cpp b/src/renderer/atlas/AtlasEngine.cpp index 983b4cd082b..a42bdc48a54 100644 --- a/src/renderer/atlas/AtlasEngine.cpp +++ b/src/renderer/atlas/AtlasEngine.cpp @@ -681,11 +681,23 @@ void AtlasEngine::_createResources() break; } - static constexpr auto flags = D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR | D3DCOMPILE_ENABLE_STRICTNESS | D3DCOMPILE_WARNINGS_ARE_ERRORS + static constexpr auto flags = + D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR #ifdef NDEBUG - | D3DCOMPILE_OPTIMIZATION_LEVEL3; + | D3DCOMPILE_OPTIMIZATION_LEVEL3 + ; #else - | D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; + // Only enable strictness and warnings in DEBUG mode + // as these settings makes it very difficult to develop + // shaders as windows terminal is not telling the user + // what's wrong, windows terminal just fails. + // Keep it in DEBUG mode to catch errors in shaders + // shipped with windows terminal + | D3DCOMPILE_ENABLE_STRICTNESS + | D3DCOMPILE_WARNINGS_ARE_ERRORS + | D3DCOMPILE_DEBUG + | D3DCOMPILE_SKIP_OPTIMIZATION + ; #endif wil::com_ptr error; From 5dee5e3c1fd27de3670902e826f91a813acf4407 Mon Sep 17 00:00:00 2001 From: mrange Date: Wed, 14 Sep 2022 21:41:20 +0200 Subject: [PATCH 2/3] Fixed small spelling error suggested by the workflow --- src/cascadia/TerminalCore/TerminalSelection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/TerminalCore/TerminalSelection.cpp b/src/cascadia/TerminalCore/TerminalSelection.cpp index bb71a348e3f..f7c63b9cf8d 100644 --- a/src/cascadia/TerminalCore/TerminalSelection.cpp +++ b/src/cascadia/TerminalCore/TerminalSelection.cpp @@ -379,7 +379,7 @@ void Terminal::ExpandSelectionToWord() _selection->pivot = _selection->start; _selection->end = buffer.GetWordEnd(_selection->end, _wordDelimiters); - // if we're targetting both endpoints, instead just target "end" + // if we're targeting both endpoints, instead just target "end" if (WI_IsFlagSet(_selectionEndpoint, SelectionEndpoint::Start) && WI_IsFlagSet(_selectionEndpoint, SelectionEndpoint::End)) { _selectionEndpoint = SelectionEndpoint::End; From 1f19d66f5293d78919e1aca9b34b3ef30ca857ab Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Wed, 14 Sep 2022 15:43:23 -0500 Subject: [PATCH 3/3] cord format --- src/renderer/atlas/AtlasEngine.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/renderer/atlas/AtlasEngine.cpp b/src/renderer/atlas/AtlasEngine.cpp index a42bdc48a54..63d253e622a 100644 --- a/src/renderer/atlas/AtlasEngine.cpp +++ b/src/renderer/atlas/AtlasEngine.cpp @@ -682,22 +682,17 @@ void AtlasEngine::_createResources() } static constexpr auto flags = - D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR + D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR #ifdef NDEBUG - | D3DCOMPILE_OPTIMIZATION_LEVEL3 - ; + | D3DCOMPILE_OPTIMIZATION_LEVEL3; #else - // Only enable strictness and warnings in DEBUG mode - // as these settings makes it very difficult to develop - // shaders as windows terminal is not telling the user - // what's wrong, windows terminal just fails. - // Keep it in DEBUG mode to catch errors in shaders - // shipped with windows terminal - | D3DCOMPILE_ENABLE_STRICTNESS - | D3DCOMPILE_WARNINGS_ARE_ERRORS - | D3DCOMPILE_DEBUG - | D3DCOMPILE_SKIP_OPTIMIZATION - ; + // Only enable strictness and warnings in DEBUG mode + // as these settings makes it very difficult to develop + // shaders as windows terminal is not telling the user + // what's wrong, windows terminal just fails. + // Keep it in DEBUG mode to catch errors in shaders + // shipped with windows terminal + | D3DCOMPILE_ENABLE_STRICTNESS | D3DCOMPILE_WARNINGS_ARE_ERRORS | D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION; #endif wil::com_ptr error;