Lines Matching defs:source

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();
1705 std::ostringstream source;
1706 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"
1716 return source.str();
1752 std::ostringstream source;
1753 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"
1764 source << " texture(sampler, lod);\n";
1768 source << " highp " << declareAndInitializeShaderVariable(thirdArgumentDataType, "thirdArgument")
1776 source << "}\n";
1778 return source.str();
2581 std::ostringstream source;
2582 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"
2593 return source.str();
2723 std::ostringstream source;
2724 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"
2740 source << " " << declareAndInitializeShaderVariable(sampleDataType, "varSample")
2747 source << " texelFetch(sampler, P);\n";
2754 source << "}\n";
2756 return source.str();
3027 std::ostringstream source;
3028 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"
3036 source << " EmitVertex();\n";
3040 source << " EndPrimitive();\n";
3047 source << "}\n";
3049 return source.str();
3093 std::ostringstream source;
3095 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"
3107 return source.str();
3166 std::ostringstream source;
3168 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"
3177 source << " mediump " << declareAndInitializeShaderVariable(thirdArgument, "arg3")
3180 source << " textureGather(sampler, P);\n";
3182 source << "}\n";
3184 return source.str();
3555 std::ostringstream source;
3557 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"
3570 source << " mediump " << declareAndInitializeShaderVariable(fourthArgument, "comp")
3573 source << " textureGatherOffset(sampler, P, offset);\n";
3579 source << " mediump " << declareAndInitializeShaderVariable(fourthArgument, "refZ")
3588 source << "}\n";
3590 return source.str();
3825 std::ostringstream source;
3827 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"
3836 case SHADER_FUNCTION_ATOMIC_ADD: source << " atomicAdd(mem, data);\n"; break;
3837 case SHADER_FUNCTION_ATOMIC_MIN: source << " atomicMin(mem, data);\n"; break;
3838 case SHADER_FUNCTION_ATOMIC_MAX: source << " atomicMax(mem, data);\n"; break;
3839 case SHADER_FUNCTION_ATOMIC_AND: source << " atomicAnd(mem, data);\n"; break;
3840 case SHADER_FUNCTION_ATOMIC_OR: source << " atomicOr(mem, data);\n"; break;
3841 case SHADER_FUNCTION_ATOMIC_XOR: source << " atomicXor(mem, data);\n"; break;
3842 case SHADER_FUNCTION_ATOMIC_EXCHANGE: source << " atomicExchange(mem, data);\n"; break;
3844 source << " mediump " << declareAndInitializeShaderVariable(compareDataType, "compare")
3852 source << "}\n";
3854 return source.str();
4053 std::ostringstream source;
4054 source << (isES32orGL45 ? glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES)) << "\n"
4064 source << " interpolateAtCentroid(interpolant);\n";
4068 source << " mediump " << declareAndInitializeShaderVariable(secondArgumentDataType, "sample")
4073 source << " mediump " << declareAndInitializeShaderVariable(secondArgumentDataType, "offset")
4081 source << "}\n";
4083 return source.str();
4259 std::ostringstream source;
4261 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"
4274 source << " mediump " << declareAndInitializeShaderVariable(spec.fourthArgument, "comp")
4277 source << " textureGatherOffsets(sampler, P, offsets);\n";
4283 source << " mediump " << declareAndInitializeShaderVariable(spec.fourthArgument, "refZ")
4293 source << "}\n";
4294 return source.str();
4359 std::ostringstream source;
4361 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"
4370 return source.str();