Searched refs:GL_BOOL (Results 1 - 25 of 39) sorted by relevance

12

/external/swiftshader/src/OpenGL/libGL/
H A Dutilities.cpp32 case GL_BOOL:
66 case GL_BOOL:
70 return GL_BOOL;
97 case GL_BOOL: return sizeof(GLboolean);
111 case GL_BOOL:
145 case GL_BOOL:
H A DProgram.cpp317 else if(targetUniform->type == GL_BOOL)
601 else if(targetUniform->type == GL_BOOL)
807 case GL_BOOL:
855 case GL_BOOL:
916 case GL_BOOL: applyUniform1bv(location, size, b); break;
222 ASSERT(samplerIndex < sizeof(samplersPS) / sizeof(samplersPS[0])); if(samplersPS[samplerIndex].active) { logicalTextureUnit = samplersPS[samplerIndex].logicalTextureUnit; } break; case sw::SAMPLER_VERTEX: ASSERT(samplerIndex < sizeof(samplersVS) / sizeof(samplersVS[0])); if(samplersVS[samplerIndex].active) { logicalTextureUnit = samplersVS[samplerIndex].logicalTextureUnit; } break; default: UNREACHABLE(type); } if(logicalTextureUnit < MAX_COMBINED_TEXTURE_IMAGE_UNITS) { return logicalTextureUnit; } return -1; } TextureType Program::getSamplerTextureType(sw::SamplerType type, unsigned int samplerIndex) { switch(type) { case sw::SAMPLER_PIXEL: ASSERT(samplerIndex < sizeof(samplersPS)/sizeof(samplersPS[0])); ASSERT(samplersPS[samplerIndex].active); return samplersPS[samplerIndex].textureType; case sw::SAMPLER_VERTEX: ASSERT(samplerIndex < sizeof(samplersVS)/sizeof(samplersVS[0])); ASSERT(samplersVS[samplerIndex].active); return samplersVS[samplerIndex].textureType; default: UNREACHABLE(type); } return TEXTURE_2D; } GLint Program::getUniformLocation(std::string name) { int subscript = 0; size_t open = name.find_last_of(�); size_t close = name.find_last_of(�); if(open != std::string::npos && close == name.length() - 1) { subscript = atoi(name.substr(open + 1).c_str()); name.erase(open); } unsigned int numUniforms = uniformIndex.size(); for(unsigned int location = 0; location < numUniforms; location++) { if(uniformIndex[location].name == name && uniformIndex[location].element == subscript) { return location; } } return -1; } bool Program::setUniform1fv(GLint location, GLsizei count, const GLfloat* v) { if(location < 0 || location >= (int)uniformIndex.size()) { return false; } Uniform *targetUniform = uniforms[uniformIndex[location].index]; targetUniform->dirty = true; int size = targetUniform->size(); if(size == 1 && count > 1) { return false; } count = std::min(size - (int)uniformIndex[location].element, count); if(targetUniform->type == GL_FLOAT) { memcpy(targetUniform->data + uniformIndex[location].element * sizeof(GLfloat), v, sizeof(GLfloat) * count); } else if(targetUniform->type == GL_BOOL) argument
H A DContext.cpp1602 *type = GL_BOOL;
1608 *type = GL_BOOL;
H A DlibGL.cpp2505 if(nativeType == GL_BOOL)
2678 if(nativeType == GL_BOOL)
/external/swiftshader/src/OpenGL/libGLESv2/
H A Dutilities.cpp37 case GL_BOOL:
99 case GL_BOOL:
103 return GL_BOOL;
156 case GL_BOOL: return sizeof(GLboolean);
198 case GL_BOOL:
257 case GL_BOOL:
H A DProgram.cpp526 static GLenum boolType[] = { GL_BOOL, GL_BOOL_VEC2, GL_BOOL_VEC3, GL_BOOL_VEC4 };
737 else if(targetUniform->type == GL_BOOL)
769 static GLenum boolType[] = { GL_BOOL, GL_BOOL_VEC2, GL_BOOL_VEC3, GL_BOOL_VEC4 };
855 else if(targetUniform->type == GL_BOOL)
887 static GLenum boolType[] = { GL_BOOL, GL_BOOL_VEC2, GL_BOOL_VEC3, GL_BOOL_VEC4 };
967 case GL_BOOL:
1025 case GL_BOOL:
1074 case GL_BOOL:
1137 case GL_BOOL: applyUniform1bv(device, location, size, b); break;
326 ASSERT(samplerIndex < sizeof(samplersPS) / sizeof(samplersPS[0])); if(samplersPS[samplerIndex].active) { logicalTextureUnit = samplersPS[samplerIndex].logicalTextureUnit; } break; case sw::SAMPLER_VERTEX: ASSERT(samplerIndex < sizeof(samplersVS) / sizeof(samplersVS[0])); if(samplersVS[samplerIndex].active) { logicalTextureUnit = samplersVS[samplerIndex].logicalTextureUnit; } break; default: UNREACHABLE(type); } if(logicalTextureUnit < MAX_COMBINED_TEXTURE_IMAGE_UNITS) { return logicalTextureUnit; } return -1; } TextureType Program::getSamplerTextureType(sw::SamplerType type, unsigned int samplerIndex) { switch(type) { case sw::SAMPLER_PIXEL: ASSERT(samplerIndex < sizeof(samplersPS)/sizeof(samplersPS[0])); ASSERT(samplersPS[samplerIndex].active); return samplersPS[samplerIndex].textureType; case sw::SAMPLER_VERTEX: ASSERT(samplerIndex < sizeof(samplersVS)/sizeof(samplersVS[0])); ASSERT(samplersVS[samplerIndex].active); return samplersVS[samplerIndex].textureType; default: UNREACHABLE(type); } return TEXTURE_2D; } bool Program::isUniformDefined(const std::string &name) const { unsigned int subscript = GL_INVALID_INDEX; std::string baseName = es2::ParseUniformName(name, &subscript); size_t numUniforms = uniformIndex.size(); for(size_t location = 0; location < numUniforms; location++) { const unsigned int index = uniformIndex[location].index; if((uniformIndex[location].name == baseName) && ((index == GL_INVALID_INDEX) || ((uniforms[index]->isArray() && uniformIndex[location].element == subscript) || (subscript == GL_INVALID_INDEX)))) { return true; } } return false; } GLint Program::getUniformLocation(const std::string &name) const { unsigned int subscript = GL_INVALID_INDEX; std::string baseName = es2::ParseUniformName(name, &subscript); size_t numUniforms = uniformIndex.size(); for(size_t location = 0; location < numUniforms; location++) { const unsigned int index = uniformIndex[location].index; if((index != GL_INVALID_INDEX) && (uniformIndex[location].name == baseName) && ((uniforms[index]->isArray() && uniformIndex[location].element == subscript) || (subscript == GL_INVALID_INDEX))) { return (GLint)location; } } return -1; } GLuint Program::getUniformIndex(const std::string &name) const { unsigned int subscript = GL_INVALID_INDEX; std::string baseName = es2::ParseUniformName(name, &subscript); if(subscript != 0 && subscript != GL_INVALID_INDEX) { return GL_INVALID_INDEX; } size_t numUniforms = uniforms.size(); for(GLuint index = 0; index < numUniforms; index++) { if(uniforms[index]->name == baseName) { if(uniforms[index]->isArray() || subscript == GL_INVALID_INDEX) { return index; } } } return GL_INVALID_INDEX; } void Program::getActiveUniformBlockiv(GLuint uniformBlockIndex, GLenum pname, GLint *params) const { ASSERT(uniformBlockIndex < getActiveUniformBlockCount()); const UniformBlock &uniformBlock = *uniformBlocks[uniformBlockIndex]; switch(pname) { case GL_UNIFORM_BLOCK_DATA_SIZE: *params = static_cast<GLint>(uniformBlock.dataSize); break; case GL_UNIFORM_BLOCK_NAME_LENGTH: *params = static_cast<GLint>(uniformBlock.name.size() + 1 + (uniformBlock.isArrayElement() ? 3 : 0)); break; case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS: *params = static_cast<GLint>(uniformBlock.memberUniformIndexes.size()); break; case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: { for(unsigned int blockMemberIndex = 0; blockMemberIndex < uniformBlock.memberUniformIndexes.size(); blockMemberIndex++) { params[blockMemberIndex] = static_cast<GLint>(uniformBlock.memberUniformIndexes[blockMemberIndex]); } } break; case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: *params = static_cast<GLint>(uniformBlock.isReferencedByVertexShader()); break; case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: *params = static_cast<GLint>(uniformBlock.isReferencedByFragmentShader()); break; default: UNREACHABLE(pname); } } GLuint Program::getUniformBlockIndex(const std::string &name) const { unsigned int subscript = GL_INVALID_INDEX; std::string baseName = es2::ParseUniformName(name, &subscript); size_t numUniformBlocks = getActiveUniformBlockCount(); for(GLuint blockIndex = 0; blockIndex < numUniformBlocks; blockIndex++) { const UniformBlock &uniformBlock = *uniformBlocks[blockIndex]; if(uniformBlock.name == baseName) { const bool arrayElementZero = (subscript == GL_INVALID_INDEX && uniformBlock.elementIndex == 0); if(subscript == uniformBlock.elementIndex || arrayElementZero) { return blockIndex; } } } return GL_INVALID_INDEX; } void Program::bindUniformBlock(GLuint uniformBlockIndex, GLuint uniformBlockBinding) { if(uniformBlockIndex >= getActiveUniformBlockCount()) { return error(GL_INVALID_VALUE); } uniformBlockBindings[uniformBlockIndex] = uniformBlockBinding; } GLuint Program::getUniformBlockBinding(GLuint uniformBlockIndex) const { if(uniformBlockIndex >= getActiveUniformBlockCount()) { return error(GL_INVALID_VALUE, GL_INVALID_INDEX); } return uniformBlockBindings[uniformBlockIndex]; } void Program::resetUniformBlockBindings() { for(unsigned int blockId = 0; blockId < MAX_UNIFORM_BUFFER_BINDINGS; blockId++) { uniformBlockBindings[blockId] = 0; } } bool Program::setUniformfv(GLint location, GLsizei count, const GLfloat *v, int numElements) { ASSERT(numElements >= 1 && numElements <= 4); static GLenum floatType[] = { GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4 }; static GLenum boolType[] = { GL_BOOL, GL_BOOL_VEC2, GL_BOOL_VEC3, GL_BOOL_VEC4 }; if(location < 0 || location >= (int)uniformIndex.size() || (uniformIndex[location].index == GL_INVALID_INDEX)) { return false; } Uniform *targetUniform = uniforms[uniformIndex[location].index]; targetUniform->dirty = true; int size = targetUniform->size(); if(size == 1 && count > 1) { return false; } count = std::min(size - (int)uniformIndex[location].element, count); int index = numElements - 1; if(targetUniform->type == floatType[index]) { memcpy(targetUniform->data + uniformIndex[location].element * sizeof(GLfloat)* numElements, v, numElements * sizeof(GLfloat) * count); } else if(targetUniform->type == boolType[index]) argument
H A DlibGLESv3.cpp1557 if(nativeType == GL_BOOL)
2902 if(nativeType == GL_BOOL)
2985 if(nativeType == GL_BOOL)
H A DContext.cpp2690 *type = GL_BOOL;
2696 *type = GL_BOOL;
H A DlibGLESv2.cpp2668 if(nativeType == GL_BOOL)
3049 if(nativeType == GL_BOOL)
/external/mesa3d/src/compiler/
H A Dbuiltin_type_macros.h34 DECL_TYPE(bool, GL_BOOL, GLSL_TYPE_BOOL, 1, 1)
/external/deqp/framework/opengl/
H A DgluShaderUtil.cpp873 case GL_BOOL: return TYPE_BOOL;
H A DgluStrUtil.inl965 case GL_BOOL: return "GL_BOOL";
/external/mesa3d/src/mesa/main/
H A Darrayobj.c299 init_array(ctx, vao, VERT_ATTRIB_EDGEFLAG, 1, GL_BOOL);
H A Dvarray.c90 case GL_BOOL:
/external/swiftshader/third_party/PowerVR_SDK/Builds/Include/GLES2/
H A Dgl2.h385 #define GL_BOOL 0x8B56 macro
/external/mesa3d/include/GLES2/
H A Dgl2.h318 #define GL_BOOL 0x8B56 macro
/external/swiftshader/include/GLES2/
H A Dgl2.h320 #define GL_BOOL 0x8B56 macro
/external/swiftshader/third_party/PowerVR_SDK/Builds/Include/GLES3/
H A Dgl3.h409 #define GL_BOOL 0x8B56 macro
/external/deqp/modules/gles2/functional/
H A Des2fShaderStateQueryTests.cpp1334 { "bool", "", "", "", "float(uniformValue)", GL_BOOL, 1, GL_FALSE },
/external/deqp/framework/opengl/wrapper/
H A DglwEnums.inl926 #define GL_BOOL 0x8B56
/external/mesa3d/src/mesa/state_tracker/
H A Dst_glsl_to_tgsi.cpp345 int type; /**< GL_DOUBLE, GL_FLOAT, GL_INT, GL_BOOL, or GL_UNSIGNED_INT */
3216 gl_type = native_integers ? GL_BOOL : GL_FLOAT;
5329 case GL_BOOL:
/external/deqp/modules/gles3/functional/
H A Des3fShaderStateQueryTests.cpp1636 { "bool", "", "", "", "float(uniformValue)", GL_BOOL, 1, GL_FALSE },
/external/mesa3d/include/GLES3/
H A Dgl3.h318 #define GL_BOOL 0x8B56 macro
H A Dgl31.h318 #define GL_BOOL 0x8B56 macro
/external/swiftshader/include/GLES3/
H A Dgl3.h320 #define GL_BOOL 0x8B56 macro

Completed in 535 milliseconds

12