ShaderManagers: Use aggregate initialization for some variables.

These provide the same semantics, however aggregate initialization
doesn't force the structs to be trivially copyable. memset, on the other
hand, does.
This commit is contained in:
Lioncash committed 2016-12-10 17:33:51 -05:00
1 parent 1fa61af413
commit 8dcb05802b
3 files changed
+4 -4

No files matched your search

@@ -21,7 +21,7 @@ static bool s_viewport_changed;
void GeometryShaderManager::Init()
{
memset(&constants, 0, sizeof(constants));
constants = {};
// Init any intial constants which aren't zero when bpmem is zero.
SetViewportChanged();
@@ -21,7 +21,7 @@ bool PixelShaderManager::dirty;
void PixelShaderManager::Init()
{
memset(&constants, 0, sizeof(constants));
constants = {};
// Init any intial constants which aren't zero when bpmem is zero.
s_bFogRangeAdjustChanged = true;
@@ -203,8 +203,8 @@ void VertexShaderManager::Init()
bProjectionChanged = true;
bViewportChanged = false;
memset(&xfmem, 0, sizeof(xfmem));
memset(&constants, 0, sizeof(constants));
xfmem = {};
constants = {};
ResetView();
// TODO: should these go inside ResetView()?