Commit e5a57888 by Nicolas Capens Committed by Nicolas Capens

Fix Chromium build.

Change-Id: If8871d9286ef7c4d09fd075ad5c7b707079158dd Reviewed-on: https://swiftshader-review.googlesource.com/17108Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 2cf121d1
...@@ -150,6 +150,8 @@ if(MSVC) ...@@ -150,6 +150,8 @@ if(MSVC)
else() else()
set_cpp_flag("--std=c++11") set_cpp_flag("--std=c++11")
set_cpp_flag("-Wall") set_cpp_flag("-Wall")
set_cpp_flag("-Werror=reorder")
set_cpp_flag("-Werror=sign-compare")
set_cpp_flag("-fno-exceptions") set_cpp_flag("-fno-exceptions")
# Don't allow symbols to be overridden by another module. # Don't allow symbols to be overridden by another module.
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
int TSymbolTableLevel::uniqueId = 0; int TSymbolTableLevel::uniqueId = 0;
TType::TType(const TPublicType &p) : TType::TType(const TPublicType &p) :
type(p.type), precision(p.precision), qualifier(p.qualifier), layoutQualifier(p.layoutQualifier), type(p.type), precision(p.precision), qualifier(p.qualifier),
primarySize(p.primarySize), secondarySize(p.secondarySize), array(p.array), arraySize(p.arraySize), maxArraySize(0), primarySize(p.primarySize), secondarySize(p.secondarySize), array(p.array), arraySize(p.arraySize), maxArraySize(0),
arrayInformationType(0), interfaceBlock(0), structure(0), mangled(0) arrayInformationType(0), interfaceBlock(0), layoutQualifier(p.layoutQualifier), structure(0), mangled(0)
{ {
if (p.userDef) if (p.userDef)
{ {
......
...@@ -240,35 +240,38 @@ class TType ...@@ -240,35 +240,38 @@ class TType
{ {
public: public:
POOL_ALLOCATOR_NEW_DELETE(); POOL_ALLOCATOR_NEW_DELETE();
TType(TBasicType t, int s0 = 1, int s1 = 1) : TType(TBasicType t, int s0 = 1, int s1 = 1) :
type(t), precision(EbpUndefined), qualifier(EvqGlobal), layoutQualifier(TLayoutQualifier::create()), type(t), precision(EbpUndefined), qualifier(EvqGlobal),
primarySize(s0), secondarySize(s1), array(false), arraySize(0), maxArraySize(0), arrayInformationType(0), interfaceBlock(0), primarySize(s0), secondarySize(s1), array(false), arraySize(0), maxArraySize(0), arrayInformationType(0), interfaceBlock(0), layoutQualifier(TLayoutQualifier::create()),
structure(0), mangled(0) structure(0), mangled(0)
{ {
} }
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s0 = 1, int s1 = 1, bool a = false) : TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s0 = 1, int s1 = 1, bool a = false) :
type(t), precision(p), qualifier(q), layoutQualifier(TLayoutQualifier::create()), type(t), precision(p), qualifier(q),
primarySize(s0), secondarySize(s1), array(a), arraySize(0), maxArraySize(0), arrayInformationType(0), interfaceBlock(0), primarySize(s0), secondarySize(s1), array(a), arraySize(0), maxArraySize(0), arrayInformationType(0), interfaceBlock(0), layoutQualifier(TLayoutQualifier::create()),
structure(0), mangled(0) structure(0), mangled(0)
{ {
} }
explicit TType(const TPublicType &p);
TType(TStructure* userDef, TPrecision p = EbpUndefined) : TType(TStructure* userDef, TPrecision p = EbpUndefined) :
type(EbtStruct), precision(p), qualifier(EvqTemporary), layoutQualifier(TLayoutQualifier::create()), type(EbtStruct), precision(p), qualifier(EvqTemporary),
primarySize(1), secondarySize(1), array(false), arraySize(0), maxArraySize(0), arrayInformationType(0), interfaceBlock(0), primarySize(1), secondarySize(1), array(false), arraySize(0), maxArraySize(0), arrayInformationType(0), interfaceBlock(0), layoutQualifier(TLayoutQualifier::create()),
structure(userDef),mangled(0) structure(userDef), mangled(0)
{ {
} }
TType(TInterfaceBlock *interfaceBlockIn, TQualifier qualifierIn, TType(TInterfaceBlock *interfaceBlockIn, TQualifier qualifierIn,
TLayoutQualifier layoutQualifierIn, int arraySizeIn) TLayoutQualifier layoutQualifierIn, int arraySizeIn)
: type(EbtInterfaceBlock), precision(EbpUndefined), qualifier(qualifierIn), : type(EbtInterfaceBlock), precision(EbpUndefined), qualifier(qualifierIn),
layoutQualifier(layoutQualifierIn),
primarySize(1), secondarySize(1), array(arraySizeIn > 0), arraySize(arraySizeIn), maxArraySize(0), arrayInformationType(0), primarySize(1), secondarySize(1), array(arraySizeIn > 0), arraySize(arraySizeIn), maxArraySize(0), arrayInformationType(0),
interfaceBlock(interfaceBlockIn), structure(0), mangled(0) interfaceBlock(interfaceBlockIn), layoutQualifier(layoutQualifierIn), structure(0), mangled(0)
{ {
} }
explicit TType(const TPublicType &p);
TBasicType getBasicType() const { return type; } TBasicType getBasicType() const { return type; }
void setBasicType(TBasicType t) { type = t; } void setBasicType(TBasicType t) { type = t; }
......
...@@ -2435,7 +2435,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height, ...@@ -2435,7 +2435,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
sw::Rect rect = {x, y, x + width, y + height}; sw::Rect rect = {x, y, x + width, y + height};
rect.clip(0, 0, renderTarget->getWidth(), renderTarget->getHeight()); rect.clip(0, 0, renderTarget->getWidth(), renderTarget->getHeight());
unsigned char *source = (unsigned char*)renderTarget->lock(rect.x0, rect.y0, sw::LOCK_READONLY); unsigned char *source = (unsigned char*)renderTarget->lock(rect.x0, rect.y0, 0, sw::LOCK_READONLY);
unsigned char *dest = (unsigned char*)pixels; unsigned char *dest = (unsigned char*)pixels;
int inputPitch = (int)renderTarget->getPitch(); int inputPitch = (int)renderTarget->getPitch();
......
...@@ -231,7 +231,7 @@ void Texture::setImage(egl::Context *context, GLenum format, GLenum type, GLint ...@@ -231,7 +231,7 @@ void Texture::setImage(egl::Context *context, GLenum format, GLenum type, GLint
{ {
if(pixels && image) if(pixels && image)
{ {
egl::Image::PixelStorageModes unpackParameters; egl::PixelStorageModes unpackParameters;
unpackParameters.alignment = unpackAlignment; unpackParameters.alignment = unpackAlignment;
image->loadImageData(context, 0, 0, 0, image->getWidth(), image->getHeight(), 1, format, type, unpackParameters, pixels); image->loadImageData(context, 0, 0, 0, image->getWidth(), image->getHeight(), 1, format, type, unpackParameters, pixels);
} }
...@@ -269,7 +269,7 @@ void Texture::subImage(egl::Context *context, GLint xoffset, GLint yoffset, GLsi ...@@ -269,7 +269,7 @@ void Texture::subImage(egl::Context *context, GLint xoffset, GLint yoffset, GLsi
if(pixels) if(pixels)
{ {
egl::Image::PixelStorageModes unpackParameters; egl::PixelStorageModes unpackParameters;
unpackParameters.alignment = unpackAlignment; unpackParameters.alignment = unpackAlignment;
image->loadImageData(context, xoffset, yoffset, 0, width, height, 1, format, type, unpackParameters, pixels); image->loadImageData(context, xoffset, yoffset, 0, width, height, 1, format, type, unpackParameters, pixels);
} }
......
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