Home | History | Annotate | Download | only in functional

Lines Matching defs:source

5  * Copyright 2016 The Android Open Source Project
186 const char* source = shaderSource.c_str();
190 shader.setSources(1, &source, &length);
250 std::ostringstream source;
251 source << getDataTypeName(dataType) << " " << varName << "[" << arraySize << "]" << " = " << getDataTypeName(dataType) << "[](";
254 source << getDataTypeName(dataType) << "(" << 0 << ", " << 0 << ")" << ((ndx < arraySize -1) ? ", " : "");
256 source << ");";
257 return source.str();
266 std::ostringstream source;
267 source << "#extension " << extension << " : enable\n";
268 return source.str();
274 std::ostringstream source;
281 source << "GL_EXT_texture_cube_map_array";
287 source << "GL_EXT_texture_buffer";
293 source << "GL_OES_texture_storage_multisample_2d_array";
300 return source.str();
305 std::ostringstream source;
312 source << "#extension GL_EXT_geometry_shader : enable\n";
316 source << "#extension GL_EXT_tessellation_shader : enable\n";
320 source << "#extension GL_EXT_tessellation_shader : enable\n";
331 source << "layout(max_vertices = 5) out;\n";
335 source << "layout(vertices = 3) out;\n";
339 source << "layout(triangles, equal_spacing, cw) in;\n";
346 return source.str();
351 std::ostringstream source;
352 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
362 return source.str();
448 std::ostringstream source;
449 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
460 return source.str();
603 std::ostringstream source;
604 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
612 case SHADER_FUNCTION_BITFIELD_REVERSE: source << " bitfieldReverse(value);\n"; break;
613 case SHADER_FUNCTION_BIT_COUNT: source << " bitCount(value);\n"; break;
614 case SHADER_FUNCTION_FIND_MSB: source << " findMSB(value);\n"; break;
615 case SHADER_FUNCTION_FIND_LSB: source << " findLSB(value);\n"; break;
620 source << "}\n";
622 return source.str();
707 std::ostringstream source;
708 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
718 source << " " << declareAndInitializeShaderVariable(carryBorrowDataType, "carry")
723 source << " " << declareAndInitializeShaderVariable(carryBorrowDataType, "borrow")
731 source << "}\n";
733 return source.str();
962 std::ostringstream source;
963 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
974 case SHADER_FUNCTION_UMUL_EXTENDED: source << " umulExtended(x, y, msb, lsb);\n"; break;
975 case SHADER_FUNCTION_IMUL_EXTENDED: source << " imulExtended(x, y, msb, lsb);\n"; break;
980 source << "}\n";
982 return source.str();
1286 std::ostringstream source;
1287 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
1297 source << " frexp(x, exp);\n";
1301 source << " ldexp(x, exp);\n";
1308 source << "}\n";
1310 return source.str();
1433 std::ostringstream source;
1434 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
1442 source << " mediump " << declareAndInitializeShaderVariable(dataType, "v")
1447 source << " mediump " << declareAndInitializeShaderVariable(dataType, "v")
1452 source << " highp " << declareAndInitializeShaderVariable(dataType, "p")
1457 source << " highp " << declareAndInitializeShaderVariable(dataType, "p")
1465 source << "}\n";
1467 return source.str();
1618 std::ostringstream source;
1619 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
1647 source << " textureSize(sampler);\n";
1659 source << " " << declareAndInitializeShaderVariable(lodDataType, "lod")
1667 source << "}\n";
1669 return source.str();
1698 std::ostringstream source;
1699 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
1709 return source.str();
1745 std::ostringstream source;
1746 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
1757 source << " texture(sampler, lod);\n";
1761 source << " highp " << declareAndInitializeShaderVariable(thirdArgumentDataType, "thirdArgument")
1769 source << "}\n";
1771 return source.str();
2574 std::ostringstream source;
2575 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
2586 return source.str();
2716 std::ostringstream source;
2717 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
2733 source << " " << declareAndInitializeShaderVariable(sampleDataType, "varSample")
2740 source << " texelFetch(sampler, P);\n";
2747 source << "}\n";
2749 return source.str();
3020 std::ostringstream source;
3021 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
3029 source << " EmitVertex();\n";
3033 source << " EndPrimitive();\n";
3040 source << "}\n";
3042 return source.str();
3086 std::ostringstream source;
3088 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
3100 return source.str();
3158 std::ostringstream source;
3160 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
3169 source << " mediump " << declareAndInitializeShaderVariable(thirdArgument, "arg3")
3172 source << " textureGather(sampler, P);\n";
3174 source << "}\n";
3176 return source.str();
3547 std::ostringstream source;
3549 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
3562 source << " mediump " << declareAndInitializeShaderVariable(fourthArgument, "comp")
3565 source << " textureGatherOffset(sampler, P, offset);\n";
3571 source << " mediump " << declareAndInitializeShaderVariable(fourthArgument, "refZ")
3580 source << "}\n";
3582 return source.str();
3817 std::ostringstream source;
3819 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
3828 case SHADER_FUNCTION_ATOMIC_ADD: source << " atomicAdd(mem, data);\n"; break;
3829 case SHADER_FUNCTION_ATOMIC_MIN: source << " atomicMin(mem, data);\n"; break;
3830 case SHADER_FUNCTION_ATOMIC_MAX: source << " atomicMax(mem, data);\n"; break;
3831 case SHADER_FUNCTION_ATOMIC_AND: source << " atomicAnd(mem, data);\n"; break;
3832 case SHADER_FUNCTION_ATOMIC_OR: source << " atomicOr(mem, data);\n"; break;
3833 case SHADER_FUNCTION_ATOMIC_XOR: source << " atomicXor(mem, data);\n"; break;
3834 case SHADER_FUNCTION_ATOMIC_EXCHANGE: source << " atomicExchange(mem, data);\n"; break;
3836 source << " mediump " << declareAndInitializeShaderVariable(compareDataType, "compare")
3844 source << "}\n";
3846 return source.str();
4042 std::ostringstream source;
4044 source << (isES32 ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
4054 source << " interpolateAtCentroid(interpolant);\n";
4058 source << " mediump " << declareAndInitializeShaderVariable(secondArgumentDataType, "sample")
4063 source << " mediump " << declareAndInitializeShaderVariable(secondArgumentDataType, "offset")
4071 source << "}\n";
4073 return source.str();
4249 std::ostringstream source;
4251 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
4264 source << " mediump " << declareAndInitializeShaderVariable(spec.fourthArgument, "comp")
4267 source << " textureGatherOffsets(sampler, P, offsets);\n";
4273 source << " mediump " << declareAndInitializeShaderVariable(spec.fourthArgument, "refZ")
4283 source << "}\n";
4284 return source.str();
4349 std::ostringstream source;
4351 source << (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
4360 return source.str();