mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1506179 - rename webgl::AttribBaseType::Bool to Boolean; r=jgilbert
X11.h defines a macro named "Bool", which can cause surprising compile errors due to include order. Differential Revision: https://phabricator.services.mozilla.com/D11494 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a0fb02038c
commit
6a9c2e7073
@ -140,7 +140,7 @@ ElemBaseType(const GLenum elemType)
|
||||
case LOCAL_GL_BOOL_VEC2:
|
||||
case LOCAL_GL_BOOL_VEC3:
|
||||
case LOCAL_GL_BOOL_VEC4:
|
||||
return webgl::AttribBaseType::Bool;
|
||||
return webgl::AttribBaseType::Boolean;
|
||||
|
||||
// -
|
||||
|
||||
|
@ -859,7 +859,7 @@ WebGLContext::DoFakeVertexAttrib0(const uint64_t vertexCount)
|
||||
////
|
||||
|
||||
switch (mGenericVertexAttribTypes[0]) {
|
||||
case webgl::AttribBaseType::Bool:
|
||||
case webgl::AttribBaseType::Boolean:
|
||||
case webgl::AttribBaseType::Float:
|
||||
gl->fVertexAttribPointer(0, 4, LOCAL_GL_FLOAT, false, 0, 0);
|
||||
break;
|
||||
|
@ -255,7 +255,7 @@ WebGLContext::GetVertexAttrib(JSContext* cx, GLuint index, GLenum pname,
|
||||
obj = GetVertexAttribUint32Array(cx, index);
|
||||
break;
|
||||
|
||||
case webgl::AttribBaseType::Bool:
|
||||
case webgl::AttribBaseType::Boolean:
|
||||
MOZ_CRASH("impossible");
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ webgl::ToString(const webgl::AttribBaseType x)
|
||||
return "INT";
|
||||
case webgl::AttribBaseType::UInt:
|
||||
return "UINT";
|
||||
case webgl::AttribBaseType::Bool:
|
||||
case webgl::AttribBaseType::Boolean:
|
||||
return "BOOL";
|
||||
}
|
||||
MOZ_CRASH("pacify gcc6 warning");
|
||||
@ -554,7 +554,7 @@ webgl::LinkedProgramInfo::GetDrawFetchLimits() const
|
||||
|
||||
const auto& progBaseType = progAttrib.mActiveInfo->mBaseType;
|
||||
if ((attribDataBaseType != progBaseType) &
|
||||
(progBaseType != webgl::AttribBaseType::Bool))
|
||||
(progBaseType != webgl::AttribBaseType::Boolean))
|
||||
{
|
||||
const auto& dataType = ToString(attribDataBaseType);
|
||||
const auto& progType = ToString(progBaseType);
|
||||
|
@ -193,7 +193,7 @@ enum class AttribBaseType : uint8_t {
|
||||
Int,
|
||||
UInt,
|
||||
Float, // Also includes NormU?Int
|
||||
Bool, // Can convert from anything.
|
||||
Boolean, // Can convert from anything.
|
||||
};
|
||||
const char* ToString(AttribBaseType);
|
||||
|
||||
|
@ -62,7 +62,7 @@ WebGLUniformLocation::ValidateSizeAndType(const uint8_t setterElemSize,
|
||||
|
||||
const auto& uniformType = mInfo->mActiveInfo->mBaseType;
|
||||
if (setterType != uniformType &&
|
||||
uniformType != webgl::AttribBaseType::Bool)
|
||||
uniformType != webgl::AttribBaseType::Boolean)
|
||||
{
|
||||
const auto& uniformStr = EnumString(mInfo->mActiveInfo->mElemType);
|
||||
mContext->ErrorInvalidOperation("Function used is incompatible with uniform"
|
||||
|
Loading…
Reference in New Issue
Block a user