Commit 3b396464 by Nicolas Capens

Fix operator precedence warnings.

Bug 15387371 Change-Id: I665ee641932d34abb28f150ba036bbbed9fa1431 Reviewed-on: https://swiftshader-review.googlesource.com/4503Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent b69aa273
...@@ -3256,7 +3256,7 @@ void Context::setClipPlane(int index, const float plane[4]) ...@@ -3256,7 +3256,7 @@ void Context::setClipPlane(int index, const float plane[4])
void Context::setClipPlaneEnabled(int index, bool enable) void Context::setClipPlaneEnabled(int index, bool enable)
{ {
clipFlags = clipFlags & ~((int)!enable << index) | ((int)enable << index); clipFlags = (clipFlags & ~((int)!enable << index)) | ((int)enable << index);
device->setClipFlags(clipFlags); device->setClipFlags(clipFlags);
} }
......
...@@ -1406,8 +1406,8 @@ namespace sw ...@@ -1406,8 +1406,8 @@ namespace sw
} }
int rgbaWriteMask = state.colorWriteActive(index); int rgbaWriteMask = state.colorWriteActive(index);
int bgraWriteMask = rgbaWriteMask & 0x0000000A | (rgbaWriteMask & 0x00000001) << 2 | (rgbaWriteMask & 0x00000004) >> 2; int bgraWriteMask = (rgbaWriteMask & 0x0000000A) | (rgbaWriteMask & 0x00000001) << 2 | (rgbaWriteMask & 0x00000004) >> 2;
int brgaWriteMask = rgbaWriteMask & 0x00000008 | (rgbaWriteMask & 0x00000001) << 1 | (rgbaWriteMask & 0x00000002) << 1 | (rgbaWriteMask & 0x00000004) >> 2; int brgaWriteMask = (rgbaWriteMask & 0x00000008) | (rgbaWriteMask & 0x00000001) << 1 | (rgbaWriteMask & 0x00000002) << 1 | (rgbaWriteMask & 0x00000004) >> 2;
switch(state.targetFormat[index]) switch(state.targetFormat[index])
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment