diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2019-05-30 14:15:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-30 14:15:02 +0200 |
| commit | 90c9991086e2c062f7b1ffd1bf2693f250e39e6d (patch) | |
| tree | 12a85a742159e30c824393255dd3bb1402fc6067 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | 2ce587f781aa4257a17ea68938f9a6ce18c0bc38 (diff) | |
| parent | f7eff6dab8a7103a19d6fa57772aab4f448a472d (diff) | |
Merge pull request #8141 from lioncash/init
VideoCommon/ShaderGenCommon: Simplify initialization of ShaderUid class
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 314eab9995..72402ab4c8 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -6,7 +6,6 @@ #include <cmath> #include <cstdio> -#include <cstring> #include "Common/Assert.h" #include "Common/CommonTypes.h" @@ -162,9 +161,8 @@ static const char* tevAOutputTable[] = {"prev.a", "c0.a", "c1.a", "c2.a"}; PixelShaderUid GetPixelShaderUid() { PixelShaderUid out; - pixel_shader_uid_data* uid_data = out.GetUidData<pixel_shader_uid_data>(); - memset(uid_data, 0, sizeof(*uid_data)); + pixel_shader_uid_data* const uid_data = out.GetUidData(); uid_data->useDstAlpha = bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24; @@ -340,7 +338,7 @@ PixelShaderUid GetPixelShaderUid() void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host_config, PixelShaderUid* uid) { - pixel_shader_uid_data* uid_data = uid->GetUidData<pixel_shader_uid_data>(); + pixel_shader_uid_data* const uid_data = uid->GetUidData(); // OpenGL and Vulkan convert implicitly normalized color outputs to their uint representation. // Therefore, it is not necessary to use a uint output on these backends. We also disable the |
