mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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.
This commit is contained in:
@ -65,7 +65,7 @@ struct vertex_shader_uid_data
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
typedef ShaderUid<vertex_shader_uid_data> VertexShaderUid;
|
||||
using VertexShaderUid = ShaderUid<vertex_shader_uid_data>;
|
||||
|
||||
VertexShaderUid GetVertexShaderUid();
|
||||
ShaderCode GenerateVertexShaderCode(APIType api_type, const ShaderHostConfig& host_config,
|
||||
|
Reference in New Issue
Block a user