Fix SVACE errors in Graphics Backend 04/263204/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 27 Aug 2021 12:26:40 +0000 (13:26 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 27 Aug 2021 12:27:17 +0000 (13:27 +0100)
Change-Id: I59401140ab4cb22fef23cd654c9d0e81c930ed85

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-buffer.cpp
dali/internal/graphics/gles-impl/gles-graphics-buffer.cpp
dali/internal/graphics/gles-impl/gles2-graphics-memory.cpp
dali/internal/graphics/gles-impl/gles3-graphics-memory.cpp

index 21eecf4..83b7899 100644 (file)
@@ -65,7 +65,7 @@ void TestGraphicsBuffer::Upload(uint32_t offset, uint32_t size)
   }
   else
   {
-    mGl.BufferData(GetTarget(), size, &memory[0], GL_STATIC_DRAW); //@todo Query - do we need other usages?
+    mGl.BufferData(GetTarget(), GLsizeiptr(size), &memory[0], GL_STATIC_DRAW); //@todo Query - do we need other usages?
     mCreated = true;
   }
 }
index b8dafab..ed72c22 100644 (file)
@@ -92,7 +92,7 @@ void Buffer::InitializeGPUBuffer()
 
   gl->GenBuffers(1, &mBufferId);
   context->BindBuffer(GL_ARRAY_BUFFER, mBufferId);
-  gl->BufferData(GL_ARRAY_BUFFER, mCreateInfo.size, nullptr, GL_STATIC_DRAW);
+  gl->BufferData(GL_ARRAY_BUFFER, GLsizeiptr(mCreateInfo.size), nullptr, GL_STATIC_DRAW);
 }
 
 void Buffer::DestroyResource()
@@ -169,4 +169,4 @@ void Buffer::Bind(Graphics::BufferUsage bindingTarget) const
   }
 }
 
-} // namespace Dali::Graphics::GLES
\ No newline at end of file
+} // namespace Dali::Graphics::GLES
index 4c2e45c..f4505d9 100644 (file)
@@ -83,7 +83,7 @@ void Memory2::Unlock(bool flush)
     if(!buffer->IsCPUAllocated())
     {
       buffer->Bind(BufferUsage::VERTEX_BUFFER);
-      gl->BufferSubData(GL_ARRAY_BUFFER, mMapBufferInfo.offset, mMapBufferInfo.size, mMappedPointer);
+      gl->BufferSubData(GL_ARRAY_BUFFER, mMapBufferInfo.offset, GLsizeiptr(mMapBufferInfo.size), mMappedPointer);
     }
   }
 
@@ -104,4 +104,4 @@ void Memory2::Flush()
   // TODO:
 }
 
-} // namespace Dali::Graphics::GLES
\ No newline at end of file
+} // namespace Dali::Graphics::GLES
index 8b3908d..c2864c1 100644 (file)
@@ -65,7 +65,7 @@ void* Memory3::LockRegion(uint32_t offset, uint32_t size)
       // @TODO: trashing vertex binding, better find target that is rarely used
       buffer->Bind(Graphics::BufferUsage::VERTEX_BUFFER);
       void* ptr      = nullptr;
-      ptr            = gl->MapBufferRange(GL_ARRAY_BUFFER, mMapBufferInfo.offset, mMapBufferInfo.size, GL_MAP_WRITE_BIT);
+      ptr            = gl->MapBufferRange(GL_ARRAY_BUFFER, mMapBufferInfo.offset, GLsizeiptr(mMapBufferInfo.size), GL_MAP_WRITE_BIT);
       mMappedPointer = ptr;
     }
     return mMappedPointer;
@@ -101,4 +101,4 @@ void Memory3::Flush()
   // TODO:
 }
 
-} // namespace Dali::Graphics::GLES
\ No newline at end of file
+} // namespace Dali::Graphics::GLES