Fixed all warnings in the Vulkan build on Windows
There were a bunch of warnings on Windows:
- Precision loss through type conversion
- Switch statement containing only default case
- Zero sized array
Bug b/130335507
Change-Id: I809db29db16f5dfd62d03d40353f4f2e0f6c3c93
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28768
Tested-by: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Pipeline/PixelRoutine.cpp b/src/Pipeline/PixelRoutine.cpp
index 57cbf4e..2857fb3 100644
--- a/src/Pipeline/PixelRoutine.cpp
+++ b/src/Pipeline/PixelRoutine.cpp
@@ -509,8 +509,8 @@
Int4 zTest;
// Bias values to make unsigned compares out of Reactor's (due SSE's) signed compares only
- zValue = zValue - Short4(0x8000);
- Z = Z - Short4(0x8000);
+ zValue = zValue - Short4(0x8000u);
+ Z = Z - Short4(0x8000u);
switch(state.depthCompareMode)
{