Build fix
A few things needed to be fixed:
- Removed unused local variables in Sampler.cpp
- Local tests showed that newly added files for ubsan build fix
broke Mac and Windows builds. Moved files to Linux non debug
only to fix the issue on all platforms.
Change-Id: I4d6d0d162603fdf36c581e84e177e6d042bf2d6e
Reviewed-on: https://swiftshader-review.googlesource.com/8268
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/OpenGL/libEGL/BUILD.gn b/src/OpenGL/libEGL/BUILD.gn
index 84025bd..42c77f8 100644
--- a/src/OpenGL/libEGL/BUILD.gn
+++ b/src/OpenGL/libEGL/BUILD.gn
@@ -39,8 +39,6 @@
}
sources = [
- "../../Renderer/Surface.cpp",
- "../common/Image.cpp",
"../common/Object.cpp",
"Config.cpp",
"Display.cpp",
@@ -54,6 +52,11 @@
if (is_debug) {
sources += [ "../common/debug.cpp" ]
+ } else if (is_linux) {
+ sources += [
+ "../../Renderer/Surface.cpp",
+ "../common/Image.cpp",
+ ]
}
if (is_mac) {
diff --git a/src/Renderer/Sampler.cpp b/src/Renderer/Sampler.cpp
index 93b3731..e83f29f 100644
--- a/src/Renderer/Sampler.cpp
+++ b/src/Renderer/Sampler.cpp
@@ -126,10 +126,6 @@
int pitchP = surface->getInternalPitchP();
int sliceP = surface->getInternalSliceP();
- int logWidth = log2(width);
- int logHeight = log2(height);
- int logDepth = log2(depth);
-
if(level == 0)
{
texture.widthHeightLOD[0] = width * exp2LOD;