From 37fdf81f1bfd932ef471e7c5769e7f53376ed107 Mon Sep 17 00:00:00 2001 From: Olivier Prat Date: Fri, 23 Feb 2018 19:37:12 +0100 Subject: [PATCH] Fix warnings on mac and ubuntu --- libraries/gpu-gl/src/gpu/gl/GLTexelFormat.cpp | 4 ++++ libraries/gpu/src/gpu/Batch.cpp | 2 -- libraries/gpu/src/gpu/Buffer.cpp | 5 +++-- libraries/render-utils/src/AntialiasingEffect.h | 3 --- libraries/render-utils/src/VelocityBufferPass.cpp | 1 - 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libraries/gpu-gl/src/gpu/gl/GLTexelFormat.cpp b/libraries/gpu-gl/src/gpu/gl/GLTexelFormat.cpp index c67f8d7de8..560b7337c7 100644 --- a/libraries/gpu-gl/src/gpu/gl/GLTexelFormat.cpp +++ b/libraries/gpu-gl/src/gpu/gl/GLTexelFormat.cpp @@ -185,6 +185,8 @@ GLenum GLTexelFormat::evalGLTexelFormatInternal(const gpu::Element& dstFormat) { break; case gpu::NUINT32: case gpu::NINT32: + case gpu::NUINT2: + case gpu::NINT2_10_10_10: case gpu::COMPRESSED: case gpu::NUM_TYPES: // quiet compiler Q_UNREACHABLE(); @@ -663,6 +665,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E break; case gpu::NUINT32: case gpu::NINT32: + case gpu::NUINT2: + case gpu::NINT2_10_10_10: case gpu::COMPRESSED: case gpu::NUM_TYPES: // quiet compiler Q_UNREACHABLE(); diff --git a/libraries/gpu/src/gpu/Batch.cpp b/libraries/gpu/src/gpu/Batch.cpp index 3446bc7db7..e375a50ecc 100644 --- a/libraries/gpu/src/gpu/Batch.cpp +++ b/libraries/gpu/src/gpu/Batch.cpp @@ -42,8 +42,6 @@ Batch::Batch(const char* name) { if (name) { _name = name; } -#else - (void*)name; #endif _commands.reserve(_commandsMax); _commandOffsets.reserve(_commandOffsetsMax); diff --git a/libraries/gpu/src/gpu/Buffer.cpp b/libraries/gpu/src/gpu/Buffer.cpp index 02e6c552cf..ebb768e597 100644 --- a/libraries/gpu/src/gpu/Buffer.cpp +++ b/libraries/gpu/src/gpu/Buffer.cpp @@ -98,8 +98,9 @@ Buffer::Update::Update(const Buffer& parent) : buffer(parent) { void Buffer::Update::apply() const { // Make sure we're loaded in order - auto applyUpdateCount = ++buffer._applyUpdateCount; - assert(applyUpdateCount == updateNumber); + buffer._applyUpdateCount++; + assert(buffer._applyUpdateCount == updateNumber); + const auto pageSize = buffer._pages._pageSize; buffer._renderSysmem.resize(size); buffer._renderPages.accommodate(size); diff --git a/libraries/render-utils/src/AntialiasingEffect.h b/libraries/render-utils/src/AntialiasingEffect.h index 1c4c0d56ce..3c27e8f67c 100644 --- a/libraries/render-utils/src/AntialiasingEffect.h +++ b/libraries/render-utils/src/AntialiasingEffect.h @@ -189,9 +189,6 @@ public: private: - // Uniforms for AA - gpu::int32 _texcoordOffsetLoc; - gpu::FramebufferSwapChainPointer _antialiasingBuffers; gpu::TexturePointer _antialiasingTextures[2]; diff --git a/libraries/render-utils/src/VelocityBufferPass.cpp b/libraries/render-utils/src/VelocityBufferPass.cpp index e298110345..78471d48af 100644 --- a/libraries/render-utils/src/VelocityBufferPass.cpp +++ b/libraries/render-utils/src/VelocityBufferPass.cpp @@ -18,7 +18,6 @@ const int VelocityBufferPass_FrameTransformSlot = 0; const int VelocityBufferPass_DepthMapSlot = 0; -const int VelocityBufferPass_NormalMapSlot = 1; #include "velocityBuffer_cameraMotion_frag.h"