Lines Matching refs:shaderSpec
94 static std::string generateVertexShader (const ShaderSpec& shaderSpec, const std::string& inputPref… in generateVertexShader() argument
96 const bool usesInout = glu::glslVersionUsesInOutQualifiers(shaderSpec.version); in generateVertexShader()
103 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n"; in generateVertexShader()
105 if (!shaderSpec.globalDeclarations.empty()) in generateVertexShader()
106 src << shaderSpec.globalDeclarations << "\n"; in generateVertexShader()
110 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generateVertexShader()
113 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateVertexShader()
136 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generateVertexShader()
140 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateVertexShader()
145 std::istringstream opSrc (shaderSpec.source); in generateVertexShader()
153 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateVertexShader()
171 static std::string generateGeometryShader (const ShaderSpec& shaderSpec, const std::string& inputPr… in generateGeometryShader() argument
173 DE_ASSERT(glu::glslVersionUsesInOutQualifiers(shaderSpec.version)); in generateGeometryShader()
178 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n"; in generateGeometryShader()
180 if (glu::glslVersionIsES(shaderSpec.version) && shaderSpec.version <= glu::GLSL_VERSION_310_ES) in generateGeometryShader()
183 if (!shaderSpec.globalDeclarations.empty()) in generateGeometryShader()
184 src << shaderSpec.globalDeclarations << "\n"; in generateGeometryShader()
189 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generateGeometryShader()
192 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateGeometryShader()
214 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generateGeometryShader()
218 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateGeometryShader()
225 std::istringstream opSrc (shaderSpec.source); in generateGeometryShader()
233 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateGeometryShader()
270 static std::string generatePassthroughVertexShader (const ShaderSpec& shaderSpec, const std::string… in generatePassthroughVertexShader() argument
273 DE_ASSERT(glu::glslVersionUsesInOutQualifiers(shaderSpec.version)); in generatePassthroughVertexShader()
277 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n" in generatePassthroughVertexShader()
280 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generatePassthroughVertexShader()
290 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generatePassthroughVertexShader()
298 static void generateFragShaderOutputDecl (std::ostream& src, const ShaderSpec& shaderSpec, bool use… in generateFragShaderOutputDecl() argument
300 DE_ASSERT(glu::glslVersionUsesInOutQualifiers(shaderSpec.version)); in generateFragShaderOutputDecl()
302 for (int outNdx = 0; outNdx < (int)shaderSpec.outputs.size(); ++outNdx) in generateFragShaderOutputDecl()
304 const Symbol& output = shaderSpec.outputs[outNdx]; in generateFragShaderOutputDecl()
349 static void generateFragShaderOutAssign (std::ostream& src, const ShaderSpec& shaderSpec, bool useI… in generateFragShaderOutAssign() argument
351 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateFragShaderOutAssign()
377 static std::string generateFragmentShader (const ShaderSpec& shaderSpec, bool useIntOutputs, const … in generateFragmentShader() argument
379 DE_ASSERT(glu::glslVersionUsesInOutQualifiers(shaderSpec.version)); in generateFragmentShader()
383 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n"; in generateFragmentShader()
385 if (!shaderSpec.globalDeclarations.empty()) in generateFragmentShader()
386 src << shaderSpec.globalDeclarations << "\n"; in generateFragmentShader()
388 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generateFragmentShader()
391 generateFragShaderOutputDecl(src, shaderSpec, useIntOutputs, outLocationMap, outputPrefix); in generateFragmentShader()
396 …for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.… in generateFragmentShader()
400 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generateFragmentShader()
405 std::istringstream opSrc (shaderSpec.source); in generateFragmentShader()
412 generateFragShaderOutAssign(src, shaderSpec, useIntOutputs, "", outputPrefix); in generateFragmentShader()
419 static std::string generatePassthroughFragmentShader (const ShaderSpec& shaderSpec, bool useIntOutp… in generatePassthroughFragmentShader() argument
421 DE_ASSERT(glu::glslVersionUsesInOutQualifiers(shaderSpec.version)); in generatePassthroughFragmentShader()
425 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n"; in generatePassthroughFragmentShader()
427 if (!shaderSpec.globalDeclarations.empty()) in generatePassthroughFragmentShader()
428 src << shaderSpec.globalDeclarations << "\n"; in generatePassthroughFragmentShader()
430 …for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outp… in generatePassthroughFragmentShader()
444 generateFragShaderOutputDecl(src, shaderSpec, useIntOutputs, outLocationMap, outputPrefix); in generatePassthroughFragmentShader()
448 generateFragShaderOutAssign(src, shaderSpec, useIntOutputs, inputPrefix, outputPrefix); in generatePassthroughFragmentShader()
457 ShaderExecutor::ShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in ShaderExecutor() argument
459 , m_inputs (shaderSpec.inputs) in ShaderExecutor()
460 , m_outputs (shaderSpec.outputs) in ShaderExecutor()
485 FragmentOutExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
520 …utExecutor::FragmentOutExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in FragmentOutExecutor() argument
521 : ShaderExecutor (renderCtx, shaderSpec) in FragmentOutExecutor()
704 VertexShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
715 …rExecutor::VertexShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in VertexShaderExecutor() argument
716 : FragmentOutExecutor (renderCtx, shaderSpec) in VertexShaderExecutor()
718 … glu::ProgramSources() << glu::VertexSource(generateVertexShader(shaderSpec, "a_", "vtx_out_")) in VertexShaderExecutor()
719 …<< glu::FragmentSource(generatePassthroughFragmentShader(shaderSpec, !hasFloatRenderTargets(render… in VertexShaderExecutor()
732 …etryShaderExecutor* create (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
744 GeometryShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
747 … GeometryShaderExecutor::create (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in create() argument
749 if (glu::glslVersionIsES(shaderSpec.version) && shaderSpec.version <= glu::GLSL_VERSION_310_ES) in create()
752 return new GeometryShaderExecutor(renderCtx, shaderSpec); in create()
755 …xecutor::GeometryShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in GeometryShaderExecutor() argument
756 : FragmentOutExecutor (renderCtx, shaderSpec) in GeometryShaderExecutor()
758 …glu::ProgramSources() << glu::VertexSource(generatePassthroughVertexShader(shaderSpec, "a_", "vtx_… in GeometryShaderExecutor()
759 << glu::GeometrySource(generateGeometryShader(shaderSpec, "vtx_out_", "geom_out_")) in GeometryShaderExecutor()
760 …<< glu::FragmentSource(generatePassthroughFragmentShader(shaderSpec, !hasFloatRenderTargets(render… in GeometryShaderExecutor()
773 FragmentShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
784 …xecutor::FragmentShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in FragmentShaderExecutor() argument
785 : FragmentOutExecutor (renderCtx, shaderSpec) in FragmentShaderExecutor()
787 …glu::ProgramSources() << glu::VertexSource(generatePassthroughVertexShader(shaderSpec, "a_", "vtx_… in FragmentShaderExecutor()
788 …<< glu::FragmentSource(generateFragmentShader(shaderSpec, !hasFloatRenderTargets(renderCtx), m_out… in FragmentShaderExecutor()
815 …BufferIoExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec, const glu::Pr…
869 …fferIoExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec, const glu::Prog… in BufferIoExecutor() argument
870 : ShaderExecutor (renderCtx, shaderSpec) in BufferIoExecutor()
1157 ComputeShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
1194 …Executor::ComputeShaderExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in ComputeShaderExecutor() argument
1195 : BufferIoExecutor (renderCtx, shaderSpec, in ComputeShaderExecutor()
1196 glu::ProgramSources() << glu::ComputeSource(generateComputeShader(shaderSpec))) in ComputeShaderExecutor()
1256 void checkTessSupport (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec, glu::Shad… in checkTessSupport() argument
1260 if (glu::glslVersionIsES(shaderSpec.version) && shaderSpec.version <= glu::GLSL_VERSION_310_ES) in checkTessSupport()
1276 …ssControlExecutor* create (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
1284 static std::string generateTessControlShader (const ShaderSpec& shaderSpec);
1287 TessControlExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
1290 …or* TessControlExecutor::create (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in create() argument
1292 checkTessSupport(renderCtx, shaderSpec, glu::SHADERTYPE_TESSELLATION_CONTROL); in create()
1294 return new TessControlExecutor(renderCtx, shaderSpec); in create()
1297 std::string TessControlExecutor::generateTessControlShader (const ShaderSpec& shaderSpec) in generateTessControlShader() argument
1301 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n"; in generateTessControlShader()
1303 if (glu::glslVersionIsES(shaderSpec.version) && shaderSpec.version <= glu::GLSL_VERSION_310_ES) in generateTessControlShader()
1306 if (!shaderSpec.globalDeclarations.empty()) in generateTessControlShader()
1307 src << shaderSpec.globalDeclarations << "\n"; in generateTessControlShader()
1311 declareBufferBlocks(src, shaderSpec); in generateTessControlShader()
1324 generateExecBufferIo(src, shaderSpec, "invocationId"); in generateTessControlShader()
1349 …olExecutor::TessControlExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in TessControlExecutor() argument
1350 : BufferIoExecutor (renderCtx, shaderSpec, glu::ProgramSources() in TessControlExecutor()
1351 << glu::VertexSource(generateVertexShaderForTess(shaderSpec.version)) in TessControlExecutor()
1352 << glu::TessellationControlSource(generateTessControlShader(shaderSpec)) in TessControlExecutor()
1353 << glu::TessellationEvaluationSource(generateEmptyTessEvalShader(shaderSpec.version)) in TessControlExecutor()
1354 << glu::FragmentSource(generateEmptyFragmentSource(shaderSpec.version))) in TessControlExecutor()
1389 …EvaluationExecutor* create (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
1397 static std::string generateTessEvalShader (const ShaderSpec& shaderSpec);
1400 TessEvaluationExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec);
1403 … TessEvaluationExecutor::create (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in create() argument
1405 checkTessSupport(renderCtx, shaderSpec, glu::SHADERTYPE_TESSELLATION_EVALUATION); in create()
1407 return new TessEvaluationExecutor(renderCtx, shaderSpec); in create()
1434 std::string TessEvaluationExecutor::generateTessEvalShader (const ShaderSpec& shaderSpec) in generateTessEvalShader() argument
1438 src << glu::getGLSLVersionDeclaration(shaderSpec.version) << "\n"; in generateTessEvalShader()
1440 if (glu::glslVersionIsES(shaderSpec.version) && shaderSpec.version <= glu::GLSL_VERSION_310_ES) in generateTessEvalShader()
1443 if (!shaderSpec.globalDeclarations.empty()) in generateTessEvalShader()
1444 src << shaderSpec.globalDeclarations << "\n"; in generateTessEvalShader()
1450 declareBufferBlocks(src, shaderSpec); in generateTessEvalShader()
1456 generateExecBufferIo(src, shaderSpec, "invocationId"); in generateTessEvalShader()
1463 …xecutor::TessEvaluationExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec) in TessEvaluationExecutor() argument
1464 : BufferIoExecutor (renderCtx, shaderSpec, glu::ProgramSources() in TessEvaluationExecutor()
1465 << glu::VertexSource(generateVertexShaderForTess(shaderSpec.version)) in TessEvaluationExecutor()
1466 << glu::TessellationControlSource(generatePassthroughTessControlShader(shaderSpec.version)) in TessEvaluationExecutor()
1467 << glu::TessellationEvaluationSource(generateTessEvalShader(shaderSpec)) in TessEvaluationExecutor()
1468 << glu::FragmentSource(generateEmptyFragmentSource(shaderSpec.version))) in TessEvaluationExecutor()
1504 …tor (const glu::RenderContext& renderCtx, glu::ShaderType shaderType, const ShaderSpec& shaderSpec) in createExecutor() argument
1508 case glu::SHADERTYPE_VERTEX: return new VertexShaderExecutor (renderCtx, shaderSpec); in createExecutor()
1509 …glu::SHADERTYPE_TESSELLATION_CONTROL: return TessControlExecutor::create (renderCtx, shaderSpec); in createExecutor()
1510 …:SHADERTYPE_TESSELLATION_EVALUATION: return TessEvaluationExecutor::create (renderCtx, shaderSpec); in createExecutor()
1511 case glu::SHADERTYPE_GEOMETRY: return GeometryShaderExecutor::create (renderCtx, shaderSpec); in createExecutor()
1512 case glu::SHADERTYPE_FRAGMENT: return new FragmentShaderExecutor (renderCtx, shaderSpec); in createExecutor()
1513 case glu::SHADERTYPE_COMPUTE: return new ComputeShaderExecutor (renderCtx, shaderSpec); in createExecutor()