From 1da3ff1b1c735a410fea80581ed5774414e6120c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 11 Sep 2013 23:57:26 -0700 Subject: glsl/tests: Add a test for properties of sampler types. For each sampler type, this tests that: - The base type is GLSL_TYPE_SAMPLER. - The dimensionality is set correctly. - The returned data type is correct. - The sampler_array and sampler_shadow flags are set correctly. - sampler_coordinate_components() returns the correct value. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- src/glsl/Makefile.am | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/glsl/Makefile.am') diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am index 9352848d6d6..2e161b844b0 100644 --- a/src/glsl/Makefile.am +++ b/src/glsl/Makefile.am @@ -34,6 +34,7 @@ include Makefile.sources TESTS = glcpp/tests/glcpp-test \ tests/optimization-test \ tests/ralloc-test \ + tests/sampler-types-test \ tests/uniform-initializer-test TESTS_ENVIRONMENT= \ @@ -45,6 +46,7 @@ check_PROGRAMS = \ glcpp/glcpp \ glsl_test \ tests/ralloc-test \ + tests/sampler-types-test \ tests/uniform-initializer-test tests_uniform_initializer_test_SOURCES = \ @@ -70,6 +72,17 @@ tests_ralloc_test_LDADD = \ $(top_builddir)/src/gtest/libgtest.la \ $(PTHREAD_LIBS) +tests_sampler_types_test_SOURCES = \ + $(top_srcdir)/src/mesa/program/prog_hash_table.c\ + $(top_srcdir)/src/mesa/program/symbol_table.c \ + tests/sampler_types_test.cpp +tests_sampler_types_test_CFLAGS = \ + $(PTHREAD_CFLAGS) +tests_sampler_types_test_LDADD = \ + $(top_builddir)/src/gtest/libgtest.la \ + $(top_builddir)/src/glsl/libglsl.la \ + $(PTHREAD_LIBS) + libglcpp_la_SOURCES = \ glcpp/glcpp-lex.c \ glcpp/glcpp-parse.c \ -- cgit v1.2.3