summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderCommon.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2026-01-17 16:49:57 -0600
committerGitHub <noreply@github.com>2026-01-17 16:49:57 -0600
commitb556bd99d72d996364f423b663af5d02a9610c4f (patch)
tree9942d30854cbe59a390221087486ab64254e9ba7 /Source/Core/VideoCommon/UberShaderCommon.cpp
parent8a606fca88a81b5a24d8cc53e5eaba91f2e38fbd (diff)
parent55f0715ad4edf4485bc7b35e49fbd883ce760e47 (diff)
Merge pull request #14268 from JoshuaVandaele/std-tounderlying
c++23: Replace Common::ToUnderlying with std::to_underlying
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderCommon.cpp')
-rw-r--r--Source/Core/VideoCommon/UberShaderCommon.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/UberShaderCommon.cpp b/Source/Core/VideoCommon/UberShaderCommon.cpp
index d35f203737..f605081481 100644
--- a/Source/Core/VideoCommon/UberShaderCommon.cpp
+++ b/Source/Core/VideoCommon/UberShaderCommon.cpp
@@ -3,7 +3,8 @@
#include "VideoCommon/UberShaderCommon.h"
-#include "Common/EnumUtils.h"
+#include <utility>
+
#include "VideoCommon/NativeVertexFormat.h"
#include "VideoCommon/ShaderGenCommon.h"
#include "VideoCommon/VideoCommon.h"
@@ -120,11 +121,11 @@ void WriteVertexLighting(ShaderCode& out, APIType api_type, std::string_view wor
out.Write(" if ({} != 0u) {{\n", BitfieldExtract<&LitChannel::enablelighting>("alphareg"));
out.Write(" if ({} != 0u) {{\n", BitfieldExtract<&LitChannel::ambsource>("alphareg"));
out.Write(" if ((components & ({}u << chan)) != 0u) // VB_HAS_COL0\n",
- Common::ToUnderlying(VB_HAS_COL0));
+ std::to_underlying(VB_HAS_COL0));
out.Write(" lacc.w = int(round(((chan == 0u) ? {}.w : {}.w) * 255.0));\n", in_color_0_var,
in_color_1_var);
out.Write(" else if ((components & {}u) != 0u) // VB_HAS_COLO0\n",
- Common::ToUnderlying(VB_HAS_COL0));
+ std::to_underlying(VB_HAS_COL0));
out.Write(" lacc.w = int(round({}.w * 255.0));\n", in_color_0_var);
out.Write(" else\n"
" lacc.w = 255;\n"