Please sign in to comment.
VideoCommon: Remove unnecessary memset on ShaderUid instances.
Zero-initialization zeroes out all members and padding bits, so this is safe to do. While we're at it, also add static assertions that enforce the necessary requirements of a UID type explicitly within the ShaderUid class. This way, we can remove several memset calls around the shader generation code that makes sure the underlying UID data is zeroed out. Now our ShaderUid class enforces this for us, so we don't need to care about it at the usage sites.
- Loading branch information...
Showing with 37 additions and 54 deletions.
- +3 −6 Source/Core/VideoCommon/GeometryShaderGen.cpp
- +1 −3 Source/Core/VideoCommon/GeometryShaderGen.h
- +2 −4 Source/Core/VideoCommon/PixelShaderGen.cpp
- +1 −1 Source/Core/VideoCommon/PixelShaderGen.h
- +13 −17 Source/Core/VideoCommon/ShaderGenCommon.h
- +2 −5 Source/Core/VideoCommon/TextureConverterShaderGen.cpp
- +5 −5 Source/Core/VideoCommon/UberShaderPixel.cpp
- +1 −1 Source/Core/VideoCommon/UberShaderPixel.h
- +4 −4 Source/Core/VideoCommon/UberShaderVertex.cpp
- +1 −1 Source/Core/VideoCommon/UberShaderVertex.h
- +3 −6 Source/Core/VideoCommon/VertexShaderGen.cpp
- +1 −1 Source/Core/VideoCommon/VertexShaderGen.h