Commit 1d4e38d3 by Jamie Madill

Fix compile warnings with attributes.

BUG=angle:676 Change-Id: I291c0b618854179f726cb4c969fb65182d3b591e Reviewed-on: https://chromium-review.googlesource.com/204340Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 2a59292d
......@@ -236,7 +236,8 @@ bool StaticVertexBufferInterface::lookupAttribute(const gl::VertexAttribute &att
mCache[element].normalized == attrib.normalized &&
mCache[element].pureInteger == attrib.pureInteger)
{
if (mCache[element].attributeOffset == attrib.offset % ComputeVertexAttributeStride(attrib))
size_t offset = (static_cast<size_t>(attrib.offset) % ComputeVertexAttributeStride(attrib));
if (mCache[element].attributeOffset == offset)
{
if (outStreamOffset)
{
......@@ -275,7 +276,7 @@ bool StaticVertexBufferInterface::storeVertexAttributes(const gl::VertexAttribut
unsigned int streamOffset;
if (VertexBufferInterface::storeVertexAttributes(attrib, currentValue, start, count, instances, &streamOffset))
{
int attributeOffset = attrib.offset % ComputeVertexAttributeStride(attrib);
size_t attributeOffset = static_cast<size_t>(attrib.offset) % ComputeVertexAttributeStride(attrib);
VertexElement element = { attrib.type, attrib.size, ComputeVertexAttributeStride(attrib), attrib.normalized, attrib.pureInteger, attributeOffset, streamOffset };
mCache.push_back(element);
......
......@@ -121,11 +121,11 @@ class StaticVertexBufferInterface : public VertexBufferInterface
struct VertexElement
{
GLenum type;
GLint size;
GLsizei stride;
GLuint size;
GLuint stride;
bool normalized;
bool pureInteger;
int attributeOffset;
size_t attributeOffset;
unsigned int streamOffset;
};
......
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