Lines Matching refs:ctx
41 void verifyProgram(NegativeTestContext& ctx, glu::ProgramSources sources)
43 tcu::TestLog& log = ctx.getLog();
44 const glu::ShaderProgram program (ctx.getRenderContext(), sources);
55 ctx.fail(message);
103 int getMaxSSBlockSize (NegativeTestContext& ctx, glw::GLenum glShaderType)
106 ctx.glGetIntegerv(getMaxSSBlockSizeEnum(glShaderType), &maxSSBlocks);
111 std::string genBlockSource (NegativeTestContext& ctx, deInt64 numSSBlocks, glw::GLenum shaderType)
113 const bool isES32 = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
157 std::string genCommonSource (NegativeTestContext& ctx, glw::GLenum shaderType)
159 const bool isES32 = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
186 int genMaxSSBlocksSource (NegativeTestContext& ctx, glw::GLenum glShaderType, glu::ProgramSources& sources)
188 int maxSSBlocks = getMaxSSBlockSize(ctx, glShaderType);
189 const std::string shaderSrc = genBlockSource(ctx, (maxSSBlocks), glShaderType);
196 void block_number_limits (NegativeTestContext& ctx)
208 const std::string vertSource = genCommonSource(ctx, GL_VERTEX_SHADER);
209 const std::string fragSource = genCommonSource(ctx, GL_FRAGMENT_SHADER);
210 const std::string tessControlSource = genCommonSource(ctx, GL_TESS_CONTROL_SHADER);
211 const std::string tessEvalSource = genCommonSource(ctx, GL_TESS_EVALUATION_SHADER);
215 ctx.beginSection("maxShaderStorageBlocks: Exceed limits");
217 if (!ctx.isShaderSupported(static_cast<glu::ShaderType>(getGLUShaderType(glShaderTypes[ndx]))))
219 ctx.endSection();
223 int maxSSBlocks = getMaxSSBlockSize(ctx, glShaderTypes[ndx]);
224 std::string source = genBlockSource(ctx, maxSSBlocks+1, glShaderTypes[ndx]);
230 ctx.endSection();
275 verifyProgram(ctx, sources);
276 ctx.endSection();
280 void max_combined_block_number_limit (NegativeTestContext& ctx)
282 ctx.beginSection("maxCombinedShaderStorageBlocks: Exceed limits");
289 combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_VERTEX_SHADER, sources);
290 combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_FRAGMENT_SHADER, sources);
292 if ((ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_CONTROL)) && (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_EVALUATION)))
294 combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_TESS_CONTROL_SHADER, sources);
295 combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_TESS_EVALUATION_SHADER, sources);
298 if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
299 combinedSSBlocks += genMaxSSBlocksSource(ctx, GL_GEOMETRY_SHADER, sources);
301 ctx.glGetIntegerv(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, &maxCombinedSSBlocks);
303 ctx.getLog() << tcu::TestLog::Message << "GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: " << maxCombinedSSBlocks << tcu::TestLog::EndMessage;
304 ctx.getLog() << tcu::TestLog::Message << "Combined shader storage blocks: " << combinedSSBlocks << tcu::TestLog::EndMessage;
307 verifyProgram(ctx, sources);
309 ctx.getLog() << tcu::TestLog::Message << "Test skipped: Combined shader storage blocks < GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: " << tcu::TestLog::EndMessage;
311 ctx.endSection();