diff options
Diffstat (limited to 'generated_tests/templates')
3 files changed, 69 insertions, 3 deletions
diff --git a/generated_tests/templates/__init__.py b/generated_tests/templates/__init__.py index cdc108815..251ab22b0 100644 --- a/generated_tests/templates/__init__.py +++ b/generated_tests/templates/__init__.py @@ -56,7 +56,7 @@ def template_file(generator, template): If the generator uses more than one template use template_dir instead. Arguments: - generator -- the name of the generator, which coresponds to the subdir of + generator -- the name of the generator, which corresponds to the subdir of the templates folder. template -- the name of the template to get. If getting a single template it's probably template.*.mako, where * is shader_test, @@ -80,7 +80,7 @@ def template_dir(generator): This is useful if a generator uses more than one template. Arguments: - generator -- the name of the generator, which coresponds to the subdir of + generator -- the name of the generator, which corresponds to the subdir of the templates folder. """ diff --git a/generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako b/generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako new file mode 100644 index 000000000..221a38a3e --- /dev/null +++ b/generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako @@ -0,0 +1,66 @@ +[require] +GLSL >= 1.50 +% for ext in extensions: +${ext} +% endfor + +[vertex shader] +#version 150 +% for ext in extensions: +#extension ${ext}: require +% endfor + +${declare_uniform_types} + +${layout}out VS_OUTPUT { +${declare_vs_output_types} +} vs_output; + +void main() +{ +${assign_vs_output_types} +} + +[fragment shader] +#version 150 +% for ext in extensions: +#extension ${ext}: require +% endfor + +${layout}in VS_OUTPUT { +${declare_vs_output_types} +} vs_output; + +out vec4 fs_output; + +% if 'GL_ARB_gpu_shader_fp64' in extensions: +vec4 convert(in double val) +{ + return vec4(val); +} +% endif +% if 'GL_ARB_gpu_shader_int64' in extensions: +vec4 convert(in int64_t val) +{ + return vec4(val); +} +vec4 convert(in uint64_t val) +{ + return vec4(val); +} +% endif +vec4 convert(in float val) +{ + return vec4(val); +} + +${calc_color} +void main() +{ + fs_output = vec4(0); +${calc_output_color} +} + +[test] +link success +draw rect -1 -1 2 2 diff --git a/generated_tests/templates/gen_variable_index_write_tests/helpers.mako b/generated_tests/templates/gen_variable_index_write_tests/helpers.mako index f4236acfc..fc549a65a 100644 --- a/generated_tests/templates/gen_variable_index_write_tests/helpers.mako +++ b/generated_tests/templates/gen_variable_index_write_tests/helpers.mako @@ -127,7 +127,7 @@ % if params.array_dim != 0: * * NOTE: This test assumes that reads of arrays using non-constant - * indicies works correctly. If reads and writes happen to fail in an + * indices works correctly. If reads and writes happen to fail in an * identical manner, this test may give false positives. % endif */ |