Lines Matching refs:ctx

68 std::string genShaderSource (NegativeTestContext& ctx, TestCase test, glu::ShaderType type)
75 ctx.glGetIntegerv(GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, &maxBuffers);
156 void iterateShaders (NegativeTestContext& ctx, TestCase testCase)
158 tcu::TestLog& log = ctx.getLog();
161 if (ctx.isShaderSupported(s_shaders[ndx]))
163 ctx.beginSection(std::string("Verify shader: ") + glu::getShaderTypeName(s_shaders[ndx]));
164 const glu::ShaderProgram program(ctx.getRenderContext(), glu::ProgramSources() << glu::ShaderSource(s_shaders[ndx], genShaderSource(ctx, testCase, s_shaders[ndx])));
169 ctx.fail("Shader was not expected to compile.");
171 ctx.endSection();
176 void atomic_max_counter_bindings (NegativeTestContext& ctx)
178 ctx.beginSection("It is a compile-time error to bind an atomic counter with a binding value greater than or equal to gl_MaxAtomicCounterBindings.");
179 iterateShaders(ctx, TESTCASE_LAYOUT_LARGE_BINDING);
180 ctx.endSection();
183 void atomic_precision (NegativeTestContext& ctx)
185 ctx.beginSection("It is an error to declare an atomic type with a lowp or mediump precision.");
186 iterateShaders(ctx, TESTCASE_LAYOUT_MEDIUMP_PRECISION);
187 iterateShaders(ctx, TESTCASE_LAYOUT_LOWP_PRECISION);
188 ctx.endSection();
191 void atomic_binding_offset_overlap (NegativeTestContext& ctx)
193 ctx.beginSection("Atomic counters may not have overlapping offsets in the same binding.");
194 iterateShaders(ctx, TESTCASE_LAYOUT_BINDING_OFFSET_OVERLAP);
195 ctx.endSection();
198 void atomic_binding_omitted (NegativeTestContext& ctx)
200 ctx.beginSection("Atomic counters must specify a binding point");
201 iterateShaders(ctx, TESTCASE_LAYOUT_BINDING_OMITTED);
202 ctx.endSection();
205 void atomic_struct (NegativeTestContext& ctx)
207 ctx.beginSection("Structures may not have an atomic_uint variable.");
208 iterateShaders(ctx, TESTCASE_STRUCT);
209 ctx.endSection();
212 void atomic_body_write (NegativeTestContext& ctx)
214 ctx.beginSection("An atomic_uint variable cannot be directly written to.");
215 iterateShaders(ctx, TESTCASE_BODY_WRITE);
216 ctx.endSection();
219 void atomic_body_declare (NegativeTestContext& ctx)
221 ctx.beginSection("An atomic_uint variable cannot be declared in local scope");
222 iterateShaders(ctx, TESTCASE_BODY_DECLARE);
223 ctx.endSection();