Merge "Update egl/common.py"
authorHengyuan Hu <hengyuan@google.com>
Fri, 12 Jun 2015 17:11:24 +0000 (17:11 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Fri, 12 Jun 2015 17:11:24 +0000 (17:11 +0000)
47 files changed:
Android.mk
android/cts/master/com.drawelements.deqp.gles3.xml
android/cts/master/com.drawelements.deqp.gles31.xml
android/cts/master/gles3-master.txt
android/cts/master/gles31-master.txt
android/cts/master/gles31-multisample.txt
android/cts/master/gles31-rotate-landscape.txt
android/cts/master/gles31-rotate-portrait.txt
android/cts/master/gles31-rotate-reverse-landscape.txt
android/cts/master/gles31-rotate-reverse-portrait.txt
android/cts/master/src/gles2-failures.txt
android/cts/master/src/gles2-test-issues.txt [new file with mode: 0644]
android/cts/master/src/gles3-driver-issues.txt
android/cts/master/src/gles3-spec-issues.txt
android/cts/master/src/gles3-test-issues.txt
android/cts/master/src/gles31-spec-issues.txt
android/cts/master/src/gles31-test-issues.txt
data/gles2/shaders/preprocessor.test
data/gles3/shaders/preprocessor.test
data/gles31/shaders/linkage_geometry_uniform_types.test
data/gles31/shaders/linkage_tessellation_uniform_types.test
framework/common/tcuImageCompare.cpp
framework/common/tcuInterval.hpp
framework/common/tcuTexture.cpp
framework/common/tcuTextureUtil.cpp
framework/delibs/debase/CMakeLists.txt
framework/delibs/debase/deMath.c
framework/delibs/debase/deMath.h
framework/delibs/debase/deMathTest.c [new file with mode: 0644]
modules/gles2/performance/es2pShaderCompilationCases.cpp
modules/gles2/tes2CapabilityTests.cpp
modules/gles3/functional/es3fShaderBuiltinVarTests.cpp
modules/gles3/functional/es3fShaderDerivateTests.cpp
modules/gles3/functional/es3fShaderOperatorTests.cpp
modules/gles3/functional/es3fShaderPrecisionTests.cpp
modules/gles3/performance/es3pShaderCompilationCases.cpp
modules/gles31/functional/es31fCopyImageTests.cpp
modules/gles31/functional/es31fDebugTests.cpp
modules/gles31/functional/es31fGeometryShaderTests.cpp
modules/gles31/functional/es31fIntegerStateQueryTests.cpp
modules/gles31/functional/es31fProgramInterfaceQueryTestCase.cpp
modules/gles31/functional/es31fTessellationTests.cpp
modules/glshared/glsShaderExecUtil.cpp
modules/glshared/glsStateQueryUtil.cpp
modules/glshared/glsVertexArrayTests.cpp
modules/internal/ditDelibsTests.cpp
scripts/build_android_mustpass.py

index 9c27830..3a6e7a0 100644 (file)
@@ -76,6 +76,7 @@ LOCAL_SRC_FILES := \
        framework/delibs/debase/deInt32.c \
        framework/delibs/debase/deInt32Test.c \
        framework/delibs/debase/deMath.c \
+       framework/delibs/debase/deMathTest.c \
        framework/delibs/debase/deMemory.c \
        framework/delibs/debase/deRandom.c \
        framework/delibs/debase/deString.c \
index e0ecc54..fc5f67b 100644 (file)
                                                <Test name="line_1_fragment">
                                                        <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                                </Test>
-                                               <Test name="line_2_vertex">
-                                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                               </Test>
-                                               <Test name="line_2_fragment">
-                                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                               </Test>
                                                <Test name="file_vertex">
                                                        <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                                </Test>
                                                <Test name="pragma_macro_exp_fragment">
                                                        <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                                </Test>
-                                               <Test name="invalid_pragma_invalid_debug_vertex">
-                                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                               </Test>
-                                               <Test name="invalid_pragma_invalid_debug_fragment">
-                                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                               </Test>
-                                               <Test name="invalid_pragma_invalid_token_vertex">
-                                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                               </Test>
-                                               <Test name="invalid_pragma_invalid_token_fragment">
-                                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                               </Test>
                                        </TestCase>
                                        <TestCase name="extensions">
                                                <Test name="basic_vertex">
                                <Test name="flush">
                                        <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                </Test>
-                               <Test name="flush_wait">
-                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                               </Test>
                                <Test name="finish">
                                        <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                </Test>
index 676ac21..c380d4a 100644 (file)
                                                </TestCase>
                                        </TestSuite>
                                        <TestSuite name="interpolate_at_centroid">
-                                               <TestCase name="consistency">
-                                                       <Test name="default_framebuffer">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="0" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="90" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="180" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="270" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms4" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="singlesample_texture">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_1">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_2">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_4">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_8">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_16">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="singlesample_rbo">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_1">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_2">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_4">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_8">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_16">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                               </TestCase>
-                                               <TestCase name="array_element">
-                                                       <Test name="default_framebuffer">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="0" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="90" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="180" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="270" surfacetype="window"/>
-                                                               <TestInstance glconfig="rgba8888d24s8ms4" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="singlesample_texture">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_1">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_2">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_4">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_8">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_texture_16">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="singlesample_rbo">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_1">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_2">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_4">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_8">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                                       <Test name="multisample_rbo_16">
-                                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
-                                                       </Test>
-                                               </TestCase>
                                                <TestCase name="negative">
                                                        <Test name="vec4_identity_swizzle">
                                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </TestCase>
                                </TestSuite>
                        </TestSuite>
+                       <TestCase name="default_vertex_array_object">
+                               <Test name="vertex_attrib_divisor">
+                                       <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                               </Test>
+                       </TestCase>
                </TestSuite>
        </TestSuite>
 </TestPackage>
index dfce400..d9bb904 100644 (file)
@@ -951,8 +951,6 @@ dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.gl_es_2_vertex
 dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.gl_es_2_fragment
 dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_1_vertex
 dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_1_fragment
-dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_2_vertex
-dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_2_fragment
 dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.file_vertex
 dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.file_fragment
 dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.if_gl_es_vertex
@@ -1143,10 +1141,6 @@ dEQP-GLES3.functional.shaders.preprocessor.pragmas.pragma_vertex
 dEQP-GLES3.functional.shaders.preprocessor.pragmas.pragma_fragment
 dEQP-GLES3.functional.shaders.preprocessor.pragmas.pragma_macro_exp_vertex
 dEQP-GLES3.functional.shaders.preprocessor.pragmas.pragma_macro_exp_fragment
-dEQP-GLES3.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_vertex
-dEQP-GLES3.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_fragment
-dEQP-GLES3.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_vertex
-dEQP-GLES3.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_fragment
 dEQP-GLES3.functional.shaders.preprocessor.extensions.basic_vertex
 dEQP-GLES3.functional.shaders.preprocessor.extensions.basic_fragment
 dEQP-GLES3.functional.shaders.preprocessor.extensions.macro_exp_vertex
@@ -41831,7 +41825,6 @@ dEQP-GLES3.functional.draw.random.209
 dEQP-GLES3.functional.draw.random.210
 dEQP-GLES3.functional.flush_finish.wait
 dEQP-GLES3.functional.flush_finish.flush
-dEQP-GLES3.functional.flush_finish.flush_wait
 dEQP-GLES3.functional.flush_finish.finish
 dEQP-GLES3.functional.flush_finish.finish_wait
 dEQP-GLES3.functional.default_vertex_attrib.float.vertex_attrib_1f
index 805672d..1a053b5 100644 (file)
@@ -3142,32 +3142,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.n
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_local
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_global
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_constant
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.singlesample_texture
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_texture_1
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_texture_2
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_texture_4
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_texture_8
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_texture_16
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.singlesample_rbo
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_rbo_1
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_rbo_2
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_rbo_4
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_rbo_8
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.multisample_rbo_16
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.singlesample_texture
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_texture_1
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_texture_2
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_texture_4
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_texture_8
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_texture_16
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.singlesample_rbo
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_rbo_1
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_rbo_2
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_rbo_4
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_rbo_8
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.multisample_rbo_16
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.negative.vec4_identity_swizzle
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.negative.vec4_crop_swizzle
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.negative.vec4_mixed_swizzle
@@ -32150,3 +32124,4 @@ dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffe
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.17
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.18
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.19
+dEQP-GLES31.functional.default_vertex_array_object.vertex_attrib_divisor
index 943a0b9..4a97ff2 100644 (file)
@@ -24,8 +24,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.s
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.no_qualifiers.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.centroid_qualifier.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.sample_qualifier.default_framebuffer
index 4c0b027..cb4528d 100644 (file)
@@ -24,8 +24,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.s
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.no_qualifiers.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.centroid_qualifier.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.sample_qualifier.default_framebuffer
index 4c0b027..cb4528d 100644 (file)
@@ -24,8 +24,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.s
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.no_qualifiers.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.centroid_qualifier.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.sample_qualifier.default_framebuffer
index 4c0b027..cb4528d 100644 (file)
@@ -24,8 +24,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.s
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.no_qualifiers.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.centroid_qualifier.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.sample_qualifier.default_framebuffer
index 4c0b027..cb4528d 100644 (file)
@@ -24,8 +24,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.s
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.default_framebuffer
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.no_qualifiers.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.centroid_qualifier.default_framebuffer
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.sample_qualifier.default_framebuffer
index 74c0b72..0236295 100644 (file)
@@ -1941,10 +1941,10 @@ dEQP-GLES2.functional.shaders.preprocessor.operator_precedence.mul_vs_plus_fragm
 dEQP-GLES2.functional.shaders.preprocessor.operator_precedence.mul_vs_plus_vertex
 dEQP-GLES2.functional.shaders.preprocessor.operator_precedence.xor_vs_bitwise_and_fragment
 dEQP-GLES2.functional.shaders.preprocessor.operator_precedence.xor_vs_bitwise_and_vertex
-dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_fragment
-dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_vertex
-dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_fragment
-dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_vertex
+dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_unrecognized_debug_fragment
+dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_unrecognized_debug_vertex
+dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_unrecognized_token_fragment
+dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_unrecognized_token_vertex
 dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_fragment
 dEQP-GLES2.functional.shaders.preprocessor.pragmas.pragma_vertex
 dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.line_2_fragment
@@ -2585,9 +2585,7 @@ dEQP-GLES2.functional.texture.size.cube.15x15_rgb888
 dEQP-GLES2.functional.texture.size.cube.15x15_rgba4444
 dEQP-GLES2.functional.texture.size.cube.15x15_rgba8888
 dEQP-GLES2.functional.texture.size.cube.16x16_l8_mipmap
-dEQP-GLES2.functional.texture.size.cube.256x256_rgba4444
 dEQP-GLES2.functional.texture.size.cube.256x256_rgba4444_mipmap
-dEQP-GLES2.functional.texture.size.cube.512x512_rgba4444
 dEQP-GLES2.functional.texture.size.cube.512x512_rgba4444_mipmap
 dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_l8_63_1
 dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_l8_63_2
diff --git a/android/cts/master/src/gles2-test-issues.txt b/android/cts/master/src/gles2-test-issues.txt
new file mode 100644 (file)
index 0000000..eb826ed
--- /dev/null
@@ -0,0 +1,3 @@
+# Bug 21526557
+dEQP-GLES2.functional.texture.size.cube.256x256_rgba4444
+dEQP-GLES2.functional.texture.size.cube.512x512_rgba4444
index 7038ff9..888d94c 100644 (file)
@@ -1,2 +1,6 @@
 # Bug 21495208
 dEQP-GLES3.functional.attribute_location.bind_aliasing.*
+
+# Bug 21737600
+dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_2_vertex
+dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_2_fragment
index c972291..d28c58b 100644 (file)
@@ -509,3 +509,6 @@ dEQP-GLES3.functional.shaders.random.trigonometric.vertex.94
 
 # Khronos bugs 11207, 12408, internal bug 20699693
 dEQP-GLES3.functional.shaders.arrays.invalid.empty_declaration_without_var_name_*
+
+# Khronos bug 13916, internal bug 20558284
+dEQP-GLES3.functional.flush_finish.flush_wait
index 220d3d4..c03cf6e 100644 (file)
@@ -64,3 +64,7 @@ dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.usampler3d_
 
 # Bug 21620051
 dEQP-GLES3.functional.shaders.texture_functions.texture.sampler2darrayshadow_vertex
+
+# Bug 21725534
+dEQP-GLES3.functional.shaders.preprocessor.pragmas.pragma_unrecognized_debug_*
+dEQP-GLES3.functional.shaders.preprocessor.pragmas.pragma_unrecognized_token_*
index f68ae46..26a63ea 100644 (file)
@@ -1,5 +1,2 @@
-# Bug 13564
-dEQP-GLES31.functional.default_vertex_array_object.vertex_attrib_divisor
-
 # Khronos bugs 11207, 12408, internal bug 20699693
 dEQP-GLES31.functional.shaders.arrays_of_arrays.invalid.empty_declaration_without_var_name_*
index 920c9a5..587f6fd 100644 (file)
@@ -23,3 +23,7 @@ dEQP-GLES31.functional.copy_image.non_compressed.viewclass_16_bits.rg8_snorm_*
 dEQP-GLES31.functional.copy_image.non_compressed.viewclass_16_bits.*_rg8_snorm.*
 dEQP-GLES31.functional.copy_image.non_compressed.viewclass_8_bits.r8_snorm_*
 dEQP-GLES31.functional.copy_image.non_compressed.viewclass_8_bits.*_r8_snorm.*
+
+# Bug 20453509
+dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.consistency.*
+dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.array_element.*
index 6aeb5e1..d2dc32b 100644 (file)
@@ -2719,11 +2719,13 @@ group pragmas "Pragma Tests"
                ""
        end
 
-       case invalid_pragma_invalid_debug
-               expect compile_fail
+       case pragma_unrecognized_debug
+               expect build_successful
                both ""
                        #pragma debug(1.23)
 
+                       // unrecognized preprocessor token
+
                        precision mediump float;
                        void main()
                        {
@@ -2732,11 +2734,13 @@ group pragmas "Pragma Tests"
                ""
        end
 
-       case invalid_pragma_invalid_token
-               expect compile_fail
+       case pragma_unrecognized_token
+               expect build_successful
                both ""
                        #pragma Â¤Â¤Â½
 
+                       // trailing bytes form a valid but unrecognized preprocessor token
+
                        precision mediump float;
                        void main()
                        {
index ed5e1f9..12e0d8c 100644 (file)
@@ -3287,13 +3287,15 @@ group pragmas "Pragma Tests"
                ""
        end
 
-       case invalid_pragma_invalid_debug
+       case pragma_unrecognized_debug
                version 300 es
-               expect compile_fail
+               expect build_successful
                both ""
                        #version 300 es
                        #pragma debug(1.23)
 
+                       // unrecognized preprocessor token
+
                        precision mediump float;
                        ${DECLARATIONS}
                        void main()
@@ -3303,13 +3305,15 @@ group pragmas "Pragma Tests"
                ""
        end
 
-       case invalid_pragma_invalid_token
+       case pragma_unrecognized_token
                version 300 es
-               expect compile_fail
+               expect build_successful
                both ""
                        #version 300 es
                        #pragma Â¤Â¤Â½
 
+                       // trailing bytes form a valid but unrecognized preprocessor token
+
                        precision mediump float;
                        ${DECLARATIONS}
                        void main()
index d13a822..460cf83 100644 (file)
@@ -33,7 +33,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mediump float geo_var;
                        void main()
@@ -77,7 +77,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in vec2 geo_var;
                        void main()
@@ -121,7 +121,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in vec3 geo_var;
                        void main()
@@ -165,7 +165,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in vec4 geo_var;
                        void main()
@@ -209,7 +209,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat2 geo_var;
                        void main()
@@ -253,7 +253,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat2x3 geo_var;
                        void main()
@@ -297,7 +297,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat2x4 geo_var;
                        void main()
@@ -341,7 +341,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat3x2 geo_var;
                        void main()
@@ -385,7 +385,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat3 geo_var;
                        void main()
@@ -429,7 +429,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat3x4 geo_var;
                        void main()
@@ -473,7 +473,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat4x2 geo_var;
                        void main()
@@ -517,7 +517,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat4x3 geo_var;
                        void main()
@@ -561,7 +561,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat4 geo_var;
                        void main()
@@ -606,6 +606,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in int geo_var;
                        void main()
@@ -650,6 +651,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in ivec2 geo_var;
                        void main()
@@ -694,6 +696,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in ivec3 geo_var;
                        void main()
@@ -738,6 +741,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in ivec4 geo_var;
                        void main()
@@ -782,6 +786,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uint geo_var;
                        void main()
@@ -826,6 +831,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uvec2 geo_var;
                        void main()
@@ -870,6 +876,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uvec3 geo_var;
                        void main()
@@ -914,6 +921,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uvec4 geo_var;
                        void main()
index 616c971..5850049 100644 (file)
@@ -41,7 +41,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mediump float te_out;
                        void main()
@@ -93,7 +93,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in vec2 te_out;
                        void main()
@@ -145,7 +145,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in vec3 te_out;
                        void main()
@@ -197,7 +197,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in vec4 te_out;
                        void main()
@@ -249,7 +249,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat2 te_out;
                        void main()
@@ -301,7 +301,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat2x3 te_out;
                        void main()
@@ -353,7 +353,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat2x4 te_out;
                        void main()
@@ -405,7 +405,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat3x2 te_out;
                        void main()
@@ -457,7 +457,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat3 te_out;
                        void main()
@@ -509,7 +509,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat3x4 te_out;
                        void main()
@@ -561,7 +561,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat4x2 te_out;
                        void main()
@@ -613,7 +613,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat4x3 te_out;
                        void main()
@@ -665,7 +665,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
-                       precision mediump float;
+                       precision highp float;
                        ${FRAGMENT_DECLARATIONS}
                        in mat4 te_out;
                        void main()
@@ -718,6 +718,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in int te_out;
                        void main()
@@ -770,6 +771,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in ivec2 te_out;
                        void main()
@@ -822,6 +824,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in ivec3 te_out;
                        void main()
@@ -874,6 +877,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in ivec4 te_out;
                        void main()
@@ -926,6 +930,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uint te_out;
                        void main()
@@ -978,6 +983,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uvec2 te_out;
                        void main()
@@ -1030,6 +1036,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uvec3 te_out;
                        void main()
@@ -1082,6 +1089,7 @@ group types "Types"
                ""
                fragment ""
                        #version 310 es
+                       precision highp int;
                        ${FRAGMENT_DECLARATIONS}
                        flat in uvec4 te_out;
                        void main()
index ced0145..0811c92 100644 (file)
@@ -31,6 +31,7 @@
 #include "tcuRGBA.hpp"
 #include "tcuTexture.hpp"
 #include "tcuTextureUtil.hpp"
+#include "tcuFloat.hpp"
 
 #include <string.h>
 
@@ -392,6 +393,74 @@ int measurePixelDiffAccuracy (TestLog& log, const char* imageSetName, const char
 }
 
 /*--------------------------------------------------------------------*//*!
+ * Returns the index of float in a float space without denormals
+ * so that:
+ * 1) f(0.0) = 0
+ * 2) f(-0.0) = 0
+ * 3) f(b) = f(a) + 1  <==>  b = nextAfter(a)
+ *
+ * See computeFloatFlushRelaxedULPDiff for details
+ *//*--------------------------------------------------------------------*/
+static deInt32 getPositionOfIEEEFloatWithoutDenormals (float x)
+{
+       DE_ASSERT(!deIsNaN(x)); // not sane
+
+       if (x == 0.0f)
+               return 0;
+       else if (x < 0.0f)
+               return -getPositionOfIEEEFloatWithoutDenormals(-x);
+       else
+       {
+               DE_ASSERT(x > 0.0f);
+
+               const tcu::Float32 f(x);
+
+               if (f.isDenorm())
+               {
+                       // Denorms are flushed to zero
+                       return 0;
+               }
+               else
+               {
+                       // sign is 0, and it's a normal number. Natural position is its bit
+                       // pattern but since we've collapsed the denorms, we must remove
+                       // the gap here too to keep the float enumeration continuous.
+                       //
+                       // Denormals occupy one exponent pattern. Removing one from
+                       // exponent should to the trick.
+                       return (deInt32)(f.bits() - (1u << 23u));
+               }
+       }
+}
+
+static deUint32 computeFloatFlushRelaxedULPDiff (float a, float b)
+{
+       if (deIsNaN(a) && deIsNaN(b))
+               return 0;
+       else if (deIsNaN(a) || deIsNaN(b))
+       {
+               return 0xFFFFFFFFu;
+       }
+       else
+       {
+               // Using the "definition 5" in Muller, Jean-Michel. "On the definition of ulp (x)" (2005)
+               // assuming a floating point space is IEEE single precision floating point space without
+               // denormals (and signed zeros).
+               const deInt32 aIndex = getPositionOfIEEEFloatWithoutDenormals(a);
+               const deInt32 bIndex = getPositionOfIEEEFloatWithoutDenormals(b);
+               return (deUint32)de::abs(aIndex - bIndex);
+       }
+}
+
+static tcu::UVec4 computeFlushRelaxedULPDiff (const tcu::Vec4& a, const tcu::Vec4& b)
+{
+       return tcu::UVec4(computeFloatFlushRelaxedULPDiff(a.x(), b.x()),
+                                         computeFloatFlushRelaxedULPDiff(a.y(), b.y()),
+                                         computeFloatFlushRelaxedULPDiff(a.z(), b.z()),
+                                         computeFloatFlushRelaxedULPDiff(a.w(), b.w()));
+}
+
+/*--------------------------------------------------------------------*//*!
  * \brief Per-pixel threshold-based comparison
  *
  * This compare computes per-pixel differences between result and reference
@@ -399,7 +468,8 @@ int measurePixelDiffAccuracy (TestLog& log, const char* imageSetName, const char
  *
  * This comparison uses ULP (units in last place) metric for computing the
  * difference between floating-point values and thus this function can
- * be used only for comparing floating-point texture data.
+ * be used only for comparing floating-point texture data. In ULP calculation
+ * the denormal numbers are allowed to be flushed to zero.
  *
  * On failure error image is generated that shows where the failing pixels
  * are.
@@ -432,17 +502,10 @@ bool floatUlpThresholdCompare (TestLog& log, const char* imageSetName, const cha
                {
                        for (int x = 0; x < width; x++)
                        {
-                               Vec4    refPix          = reference.getPixel(x, y, z);
-                               Vec4    cmpPix          = result.getPixel(x, y, z);
-                               UVec4   refBits;
-                               UVec4   cmpBits;
-
-                               // memcpy() is the way to do float->uint32 reinterpretation.
-                               memcpy(refBits.getPtr(), refPix.getPtr(), 4*sizeof(deUint32));
-                               memcpy(cmpBits.getPtr(), cmpPix.getPtr(), 4*sizeof(deUint32));
-
-                               UVec4   diff            = abs(refBits.cast<int>() - cmpBits.cast<int>()).cast<deUint32>();
-                               bool    isOk            = boolAll(lessThanEqual(diff, threshold));
+                               const Vec4      refPix  = reference.getPixel(x, y, z);
+                               const Vec4      cmpPix  = result.getPixel(x, y, z);
+                               const UVec4     diff    = computeFlushRelaxedULPDiff(refPix, cmpPix);
+                               const bool      isOk    = boolAll(lessThanEqual(diff, threshold));
 
                                maxDiff = max(maxDiff, diff);
 
index 0a2f65f..0c29d57 100644 (file)
@@ -118,7 +118,7 @@ public:
 
        bool            intersects              (const Interval& other) const
        {
-               return ((other.hi() >= lo() && other.lo() >= hi()) ||
+               return ((other.hi() >= lo() && other.lo() <= hi()) ||
                                (other.hasNaN() && hasNaN()));
        }
 
index d7e82c1..43c7616 100644 (file)
@@ -111,6 +111,50 @@ inline deUint32 readUint24 (const deUint8* src)
 #endif
 }
 
+inline deUint8 readUint32Low8 (const deUint8* src)
+{
+#if (DE_ENDIANNESS == DE_LITTLE_ENDIAN)
+       const deUint32 uint32ByteOffsetBits0To8 = 0; //!< least significant byte in the lowest address
+#else
+       const deUint32 uint32ByteOffsetBits0To8 = 3; //!< least significant byte in the highest address
+#endif
+
+       return src[uint32ByteOffsetBits0To8];
+}
+
+inline void writeUint32Low8 (deUint8* dst, deUint8 val)
+{
+#if (DE_ENDIANNESS == DE_LITTLE_ENDIAN)
+       const deUint32 uint32ByteOffsetBits0To8 = 0; //!< least significant byte in the lowest address
+#else
+       const deUint32 uint32ByteOffsetBits0To8 = 3; //!< least significant byte in the highest address
+#endif
+
+       dst[uint32ByteOffsetBits0To8] = val;
+}
+
+inline deUint32 readUint32High24 (const deUint8* src)
+{
+#if (DE_ENDIANNESS == DE_LITTLE_ENDIAN)
+       const deUint32 uint32ByteOffset8To32    = 1;
+#else
+       const deUint32 uint32ByteOffset8To32    = 0;
+#endif
+
+       return readUint24(src + uint32ByteOffset8To32);
+}
+
+inline void writeUint32High24 (deUint8* dst, deUint32 val)
+{
+#if (DE_ENDIANNESS == DE_LITTLE_ENDIAN)
+       const deUint32 uint32ByteOffset8To32    = 1;
+#else
+       const deUint32 uint32ByteOffset8To32    = 0;
+#endif
+
+       writeUint24(dst + uint32ByteOffset8To32, val);
+}
+
 // \todo [2011-09-21 pyry] Move to tcutil?
 template <typename T>
 inline T convertSatRte (float f)
@@ -788,9 +832,6 @@ float ConstPixelBufferAccess::getPixDepth (int x, int y, int z) const
 
        const deUint8* const pixelPtr = (const deUint8*)getPixelPtr(x, y, z);
 
-#define UB32(OFFS, COUNT) ((*((const deUint32*)pixelPtr) >> (OFFS)) & ((1<<(COUNT))-1))
-#define NB32(OFFS, COUNT) channelToNormFloat(UB32(OFFS, COUNT), (COUNT))
-
        DE_ASSERT(m_format.order == TextureFormat::DS || m_format.order == TextureFormat::D);
 
        switch (m_format.type)
@@ -800,7 +841,8 @@ float ConstPixelBufferAccess::getPixDepth (int x, int y, int z) const
                        {
                                case TextureFormat::D:
                                case TextureFormat::DS: // \note Fall-through.
-                                       return NB32(8, 24);
+                                       return (float)readUint32High24(pixelPtr) / 16777215.0f;
+
                                default:
                                        DE_ASSERT(false);
                                        return 0.0f;
@@ -814,9 +856,6 @@ float ConstPixelBufferAccess::getPixDepth (int x, int y, int z) const
                        DE_ASSERT(m_format.order == TextureFormat::D); // no other combined depth stencil types
                        return channelToFloat(pixelPtr, m_format.type);
        }
-
-#undef UB32
-#undef NB32
 }
 
 int ConstPixelBufferAccess::getPixStencil (int x, int y, int z) const
@@ -832,8 +871,9 @@ int ConstPixelBufferAccess::getPixStencil (int x, int y, int z) const
                case TextureFormat::UNSIGNED_INT_24_8:
                        switch (m_format.order)
                        {
-                               case TextureFormat::S:          return (int)(*((const deUint32*)pixelPtr) >> 8);
-                               case TextureFormat::DS:         return (int)(*((const deUint32*)pixelPtr) & 0xff);
+                               case TextureFormat::S:
+                               case TextureFormat::DS:
+                                       return (int)readUint32Low8(pixelPtr);
 
                                default:
                                        DE_ASSERT(false);
@@ -842,7 +882,7 @@ int ConstPixelBufferAccess::getPixStencil (int x, int y, int z) const
 
                case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
                        DE_ASSERT(m_format.order == TextureFormat::DS);
-                       return *((const deUint32*)(pixelPtr+4)) & 0xff;
+                       return (int)readUint32Low8(pixelPtr + 4);
 
                default:
                {
@@ -988,15 +1028,16 @@ void PixelBufferAccess::setPixDepth (float depth, int x, int y, int z) const
 
        deUint8* const pixelPtr = (deUint8*)getPixelPtr(x, y, z);
 
-#define PN(VAL, OFFS, BITS) (normFloatToChannel((VAL), (BITS)) << (OFFS))
-
        switch (m_format.type)
        {
                case TextureFormat::UNSIGNED_INT_24_8:
                        switch (m_format.order)
                        {
-                               case TextureFormat::D:          *((deUint32*)pixelPtr) = PN(depth, 8, 24);                                                                                      break;
-                               case TextureFormat::DS:         *((deUint32*)pixelPtr) = (*((deUint32*)pixelPtr) & 0x000000ff) | PN(depth, 8, 24);      break;
+                               case TextureFormat::D:
+                               case TextureFormat::DS:
+                                       writeUint32High24(pixelPtr,  convertSatRteUint24(depth * 16777215.0f));
+                                       break;
+
                                default:
                                        DE_ASSERT(false);
                        }
@@ -1012,8 +1053,6 @@ void PixelBufferAccess::setPixDepth (float depth, int x, int y, int z) const
                        floatToChannel(pixelPtr, depth, m_format.type);
                        break;
        }
-
-#undef PN
 }
 
 void PixelBufferAccess::setPixStencil (int stencil, int x, int y, int z) const
@@ -1024,15 +1063,16 @@ void PixelBufferAccess::setPixStencil (int stencil, int x, int y, int z) const
 
        deUint8* const pixelPtr = (deUint8*)getPixelPtr(x, y, z);
 
-#define PU(VAL, OFFS, BITS) (uintToChannel((deUint32)(VAL), (BITS)) << (OFFS))
-
        switch (m_format.type)
        {
                case TextureFormat::UNSIGNED_INT_24_8:
                        switch (m_format.order)
                        {
-                               case TextureFormat::S:          *((deUint32*)pixelPtr) = PU(stencil, 8, 24);                                                                            break;
-                               case TextureFormat::DS:         *((deUint32*)pixelPtr) = (*((deUint32*)pixelPtr) & 0xffffff00) | PU(stencil, 0, 8);     break;
+                               case TextureFormat::S:
+                               case TextureFormat::DS:
+                                       writeUint32Low8(pixelPtr, convertSat<deUint8>((deUint32)stencil));
+                                       break;
+
                                default:
                                        DE_ASSERT(false);
                        }
@@ -1040,7 +1080,7 @@ void PixelBufferAccess::setPixStencil (int stencil, int x, int y, int z) const
 
                case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
                        DE_ASSERT(m_format.order == TextureFormat::DS);
-                       *((deUint32*)(pixelPtr+4))      = PU((deUint32)stencil, 0, 8);
+                       writeUint32Low8(pixelPtr + 4, convertSat<deUint8>((deUint32)stencil));
                        break;
 
                default:
@@ -1048,8 +1088,6 @@ void PixelBufferAccess::setPixStencil (int stencil, int x, int y, int z) const
                        intToChannel(pixelPtr, stencil, m_format.type);
                        break;
        }
-
-#undef PU
 }
 
 static inline int imod (int a, int b)
index d8018af..2591f10 100644 (file)
@@ -718,9 +718,9 @@ void fillWithGrid (const PixelBufferAccess& access, int cellSize, const Vec4& co
 
                // For combined formats, treat D and S as separate channels
                if (hasDepth)
-                       fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), colorA, colorB);
+                       fillWithGrid(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_DEPTH), cellSize, colorA, colorB);
                if (hasStencil)
-                       fillWithComponentGradients(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), colorA.swizzle(3,2,1,0), colorB.swizzle(3,2,1,0));
+                       fillWithGrid(getEffectiveDepthStencilAccess(access, tcu::Sampler::MODE_STENCIL), cellSize, colorA.swizzle(3,2,1,0), colorB.swizzle(3,2,1,0));
        }
        else
        {
index 6f18c88..b960bbc 100644 (file)
@@ -14,6 +14,7 @@ set(DEBASE_SRCS
        deInt32Test.c
        deMath.c
        deMath.h
+       deMathTest.c
        deMemory.c
        deMemory.h
        deRandom.c
index 259286c..26e2aef 100644 (file)
@@ -22,6 +22,7 @@
  *//*--------------------------------------------------------------------*/
 
 #include "deMath.h"
+#include "deInt32.h"
 
 #if (DE_COMPILER == DE_COMPILER_MSC)
 #      include <float.h>
@@ -133,3 +134,56 @@ double deRoundEven (double a)
                return 2.0 * deRound(a / 2.0);
        return deRound(a);
 }
+
+float deInt32ToFloatRoundToNegInf (deInt32 x)
+{
+       /* \note Sign bit is separate so the range is symmetric */
+       if (x >= -0xFFFFFF && x <= 0xFFFFFF)
+       {
+               /* 24 bits are representable (23 mantissa + 1 implicit). */
+               return (float)x;
+       }
+       else if (x != -0x7FFFFFFF - 1)
+       {
+               /* we are losing bits */
+               const int               exponent        = 31 - deClz32((deUint32)deAbs32(x));
+               const int               numLostBits     = exponent - 23;
+               const deUint32  lostMask        = deBitMask32(0, numLostBits);
+
+               DE_ASSERT(numLostBits > 0);
+
+               if (x > 0)
+               {
+                       /* Mask out lost bits to floor to a representable value */
+                       return (float)(deInt32)(~lostMask & (deUint32)x);
+               }
+               else if ((lostMask & (deUint32)-x) == 0u)
+               {
+                       /* this was a representable value */
+                       DE_ASSERT( (deInt32)(float)x == x );
+                       return (float)x;
+               }
+               else
+               {
+                       /* not representable, choose the next lower */
+                       const float nearestHigher       = (float)-(deInt32)(~lostMask & (deUint32)-x);
+                       const float oneUlp                      = (float)(1u << (deUint32)numLostBits);
+                       const float nearestLower        = nearestHigher - oneUlp;
+
+                       /* check sanity */
+                       DE_ASSERT((deInt32)(float)nearestHigher > (deInt32)(float)nearestLower);
+
+                       return nearestLower;
+               }
+       }
+       else
+               return -(float)0x80000000u;
+}
+
+float deInt32ToFloatRoundToPosInf (deInt32 x)
+{
+       if (x == -0x7FFFFFFF - 1)
+               return -(float)0x80000000u;
+       else
+               return -deInt32ToFloatRoundToNegInf(-x);
+}
index b6f5487..12b25a5 100644 (file)
@@ -56,6 +56,8 @@ typedef enum deRoundingMode_e
 deRoundingMode         deGetRoundingMode       (void);
 deBool                         deSetRoundingMode       (deRoundingMode mode);
 
+void                           deMath_selfTest         (void);
+
 /* Float properties */
 
 /* \note The NaN test probably won't work with -ffast-math */
@@ -186,11 +188,27 @@ DE_INLINE deBool  deFloatCmpLE            (float a, float b)                      { return (a <= b); }
 DE_INLINE deBool       deFloatCmpGT            (float a, float b)                      { return (a > b);  }
 DE_INLINE deBool       deFloatCmpGE            (float a, float b)                      { return (a >= b); }
 
+/* Convert int to float. If the value cannot be represented exactly in native single precision format, return
+ * either the nearest lower or the nearest higher representable value, chosen in an implementation-defined manner.
+ *
+ * \note Choosing either nearest lower or nearest higher means that implementation could for example consistently
+ *       choose the lower value, i.e. this function does not round towards nearest.
+ * \note Value returned is in native single precision format. For example with x86 extended precision, the value
+ *       returned might not be representable in IEEE single precision float.
+ */
+DE_INLINE float                deInt32ToFloat                          (deInt32 x)                                     { return (float)x; }
+
+/* Convert to float. If the value cannot be represented exactly in IEEE single precision floating point format,
+ * return the nearest lower (round towards negative inf). */
+float                          deInt32ToFloatRoundToNegInf     (deInt32 x);
+
+/* Convert to float. If the value cannot be represented exactly IEEE single precision floating point format,
+ * return the nearest higher (round towards positive inf). */
+float                          deInt32ToFloatRoundToPosInf     (deInt32 x);
+
 /* Conversion to integer. */
 
-DE_INLINE float                deInt32ToFloat          (deInt32 x)                                     { return (float)x; }
 DE_INLINE deInt32      deChopFloatToInt32      (float x)                                       { return (deInt32)x; }
-
 DE_INLINE deInt32      deFloorFloatToInt32     (float x)                                       { return (deInt32)(deFloatFloor(x)); }
 DE_INLINE deInt32      deCeilFloatToInt32      (float x)                                       { return (deInt32)(deFloatCeil(x)); }
 
diff --git a/framework/delibs/debase/deMathTest.c b/framework/delibs/debase/deMathTest.c
new file mode 100644 (file)
index 0000000..d8e73a7
--- /dev/null
@@ -0,0 +1,107 @@
+/*-------------------------------------------------------------------------
+ * drawElements Base Portability Library
+ * -------------------------------------
+ *
+ * Copyright 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Testing of deMath functions.
+ *//*--------------------------------------------------------------------*/
+
+#include "deMath.h"
+#include "deRandom.h"
+
+DE_BEGIN_EXTERN_C
+
+static deBool conversionToFloatLosesPrecision (deInt32 x)
+{
+       if (x == -0x7FFFFFFF - 1)
+               return DE_FALSE;
+       else if (x < 0)
+               return conversionToFloatLosesPrecision(-x);
+       else if (x == 0)
+               return DE_FALSE;
+       else if (((deUint32)x & 0x1) == 0)
+               return conversionToFloatLosesPrecision(x >> 1); /* remove trailing zeros */
+       else
+               return x > ((1 << 24) - 1); /* remaining part does not fit in the mantissa? */
+}
+
+static void testSingleInt32ToFloat (deInt32 x)
+{
+       /* roundTowardsToNegInf(x) <= round(x) <= roundTowardsPosInf(x). */
+       /* \note: Need to use inequalities since round(x) returns arbitrary precision floats. */
+       DE_TEST_ASSERT(deInt32ToFloatRoundToNegInf(x) <= deInt32ToFloat(x));
+       DE_TEST_ASSERT(deInt32ToFloat(x) <= deInt32ToFloatRoundToPosInf(x));
+
+       /* if precision is lost, floor(x) < ceil(x). Else floor(x) == ceil(x) */
+       if (conversionToFloatLosesPrecision(x))
+               DE_TEST_ASSERT(deInt32ToFloatRoundToNegInf(x) < deInt32ToFloatRoundToPosInf(x));
+       else
+               DE_TEST_ASSERT(deInt32ToFloatRoundToNegInf(x) == deInt32ToFloatRoundToPosInf(x));
+
+       /* max one ulp from each other */
+       if (deInt32ToFloatRoundToNegInf(x) < deInt32ToFloatRoundToPosInf(x))
+       {
+               union
+               {
+                       float f;
+                       deInt32 u;
+               } v0, v1;
+
+               v0.f = deInt32ToFloatRoundToNegInf(x);
+               v1.f = deInt32ToFloatRoundToPosInf(x);
+
+               DE_TEST_ASSERT(v0.u + 1 == v1.u || v0.u == v1.u + 1);
+       }
+}
+
+static void testInt32ToFloat (void)
+{
+       const int       numIterations = 2500000;
+
+       int                     sign;
+       int                     numBits;
+       int                     delta;
+       int                     ndx;
+       deRandom        rnd;
+
+       deRandom_init(&rnd, 0xdeadbeefu-1);
+
+       for (sign = -1; sign < 1; ++sign)
+       for (numBits = 0; numBits < 32; ++numBits)
+       for (delta = -2; delta < 3; ++delta)
+       {
+               const deInt64 x = (deInt64)(sign == -1 ? (-1) : (+1)) * (1LL << (deInt64)numBits) + (deInt64)delta;
+
+               /* would overflow */
+               if (x > 0x7FFFFFFF || x < -0x7FFFFFFF - 1)
+                       continue;
+
+               testSingleInt32ToFloat((deInt32)x);
+       }
+
+       for (ndx = 0; ndx < numIterations; ++ndx)
+               testSingleInt32ToFloat((deInt32)deRandom_getUint32(&rnd));
+}
+
+void deMath_selfTest (void)
+{
+       /* Test Int32ToFloat*(). */
+       testInt32ToFloat();
+}
+
+DE_END_EXTERN_C
index 21ec8ef..7a921ba 100644 (file)
@@ -285,7 +285,7 @@ static tcu::Vector<float, 16> arrTo16 (const tcu::Array<float, Size>& arr)
 static string getShaderInfoLog (const glw::Functions& gl, deUint32 shader)
 {
        string                  result;
-       int                             infoLogLen;
+       int                             infoLogLen = 0;
        vector<char>    infoLogBuf;
 
        gl.getShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLen);
@@ -299,7 +299,7 @@ static string getShaderInfoLog (const glw::Functions& gl, deUint32 shader)
 static string getProgramInfoLog (const glw::Functions& gl, deUint32 program)
 {
        string                  result;
-       int                             infoLogLen;
+       int                             infoLogLen = 0;
        vector<char>    infoLogBuf;
 
        gl.getProgramiv(program, GL_INFO_LOG_LENGTH, &infoLogLen);
@@ -1710,7 +1710,7 @@ void ShaderCompilerCase::setShaderSources (deUint32 vertShader, deUint32 fragSha
 bool ShaderCompilerCase::compileShader (deUint32 shader) const
 {
        const glw::Functions& gl = m_context.getRenderContext().getFunctions();
-       GLint status;
+       GLint status = 0;
        gl.compileShader(shader);
        gl.getShaderiv(shader, GL_COMPILE_STATUS, &status);
        return status != 0;
@@ -1719,7 +1719,7 @@ bool ShaderCompilerCase::compileShader (deUint32 shader) const
 bool ShaderCompilerCase::linkAndUseProgram (deUint32 program) const
 {
        const glw::Functions& gl = m_context.getRenderContext().getFunctions();
-       GLint linkStatus;
+       GLint linkStatus = 0;
 
        gl.linkProgram(program);
        gl.getProgramiv(program, GL_LINK_STATUS, &linkStatus);
index b40a763..0e38b38 100644 (file)
@@ -52,7 +52,7 @@ public:
 
        IterateResult iterate (void)
        {
-               GLint value;
+               GLint value = 0;
                GLU_CHECK_CALL(glGetIntegerv(m_param, &value));
 
                m_testCtx.getLog() << TestLog::Message << glu::getParamQueryStr(m_param) << " = " << value << TestLog::EndMessage;
index 7874059..7cb6f4f 100644 (file)
@@ -73,7 +73,7 @@ static int getVectorsFromComps (const glw::Functions& gl, deUint32 pname)
        int value = -1;
        gl.getIntegerv(pname, &value);
        GLU_EXPECT_NO_ERROR(gl.getError(), ("glGetIntegerv(" + glu::getGettableStateStr((int)pname).toString() + ")").c_str());
-       TCU_CHECK_MSG(value%4 == 0, ("Expected " + glu::getGettableStateStr((int)pname).toString() + " to be divisible by 4").c_str());
+       // Accept truncated division. According to the spec, the number of vectors is number of components divided by four, plain and simple.
        return value/4;
 }
 
index 508cfc8..ed49d28 100644 (file)
@@ -267,7 +267,7 @@ static float getSingleULPForValue (float value, int numMantissaBits)
        return getSingleULPForExponent(exp, numMantissaBits);
 }
 
-static float convertFloorFlushToZero (float value, int minExponent, int numAccurateBits)
+static float convertFloatFlushToZeroRtn (float value, int minExponent, int numAccurateBits)
 {
        if (value == 0.0f)
        {
@@ -308,9 +308,9 @@ static float convertFloorFlushToZero (float value, int minExponent, int numAccur
        }
 }
 
-static float convertCeilFlushToZero (float value, int minExponent, int numAccurateBits)
+static float convertFloatFlushToZeroRtp (float value, int minExponent, int numAccurateBits)
 {
-       return -convertFloorFlushToZero(-value, minExponent, numAccurateBits);
+       return -convertFloatFlushToZeroRtn(-value, minExponent, numAccurateBits);
 }
 
 static float addErrorUlp (float value, float numUlps, int numMantissaBits)
@@ -489,11 +489,11 @@ static bool reverifyConstantDerivateWithFlushRelaxations (tcu::TestLog&                                                   lo
                // check components separately
                for (int c = 0; c < numComponents; ++c)
                {
-                       // interpolation value range
-                       const tcu::Interval     forwardComponent                (convertFloorFlushToZero(functionValueForward[c], minExponent, numVaryingSampleBits),
-                                                                                                                convertCeilFlushToZero(functionValueForward[c], minExponent, numVaryingSampleBits));
-                       const tcu::Interval     backwardComponent               (convertFloorFlushToZero(functionValueBackward[c], minExponent, numVaryingSampleBits),
-                                                                                                                convertCeilFlushToZero(functionValueBackward[c], minExponent, numVaryingSampleBits));
+                       // Simulate interpolation. Add allowed interpolation error and round to target precision. Allow one half ULP (i.e. correct rounding)
+                       const tcu::Interval     forwardComponent                (convertFloatFlushToZeroRtn(addErrorUlp((float)functionValueForward[c],  -0.5f, numVaryingSampleBits), minExponent, numBits),
+                                                                                                                convertFloatFlushToZeroRtp(addErrorUlp((float)functionValueForward[c],  +0.5f, numVaryingSampleBits), minExponent, numBits));
+                       const tcu::Interval     backwardComponent               (convertFloatFlushToZeroRtn(addErrorUlp((float)functionValueBackward[c], -0.5f, numVaryingSampleBits), minExponent, numBits),
+                                                                                                                convertFloatFlushToZeroRtp(addErrorUlp((float)functionValueBackward[c], +0.5f, numVaryingSampleBits), minExponent, numBits));
                        const int                       maxValueExp                             = de::max(de::max(tcu::Float32(forwardComponent.lo()).exponent(),   tcu::Float32(forwardComponent.hi()).exponent()),
                                                                                                                                  de::max(tcu::Float32(backwardComponent.lo()).exponent(),  tcu::Float32(backwardComponent.hi()).exponent()));
 
@@ -508,12 +508,12 @@ static bool reverifyConstantDerivateWithFlushRelaxations (tcu::TestLog&                                                   lo
                        const int                       numeratorLoBits                 = de::max(0, numBits - numeratorLoBitsLost);
                        const int                       numeratorHiBits                 = de::max(0, numBits - numeratorHiBitsLost);
 
-                       const tcu::Interval     numeratorRange                  (convertFloorFlushToZero((float)numerator.lo(), minExponent, numeratorLoBits),
-                                                                                                                convertCeilFlushToZero((float)numerator.hi(), minExponent, numeratorHiBits));
+                       const tcu::Interval     numeratorRange                  (convertFloatFlushToZeroRtn((float)numerator.lo(), minExponent, numeratorLoBits),
+                                                                                                                convertFloatFlushToZeroRtp((float)numerator.hi(), minExponent, numeratorHiBits));
 
                        const tcu::Interval     divisionRange                   = numeratorRange / 3.0f; // legal sample area is anywhere within this and neighboring pixels (i.e. size = 3)
-                       const tcu::Interval     divisionResultRange             (convertFloorFlushToZero(addErrorUlp((float)divisionRange.lo(), -divisionErrorUlps, numBits), minExponent, numBits),
-                                                                                                                convertCeilFlushToZero(addErrorUlp((float)divisionRange.hi(), +divisionErrorUlps, numBits), minExponent, numBits));
+                       const tcu::Interval     divisionResultRange             (convertFloatFlushToZeroRtn(addErrorUlp((float)divisionRange.lo(), -divisionErrorUlps, numBits), minExponent, numBits),
+                                                                                                                convertFloatFlushToZeroRtp(addErrorUlp((float)divisionRange.hi(), +divisionErrorUlps, numBits), minExponent, numBits));
                        const tcu::Interval     finalResultRange                (divisionResultRange.lo() - surfaceThreshold[c], divisionResultRange.hi() + surfaceThreshold[c]);
 
                        if (resultDerivative[c] >= finalResultRange.lo() && resultDerivative[c] <= finalResultRange.hi())
index f74dc7a..4ead3ea 100644 (file)
@@ -1717,7 +1717,7 @@ void ShaderOperatorTests::init (void)
                << BuiltinFuncInfo("tanh",                      "tanh",                 GT,     Value(GT, -1.5f, 5.5f),         notUsed,                                        notUsed,                                        0.5f, 0.5f,             PRECMASK_LOWP,                          FLOAT_GENTYPE_FUNCS(tanh) )
                << BuiltinFuncInfo("asinh",                     "asinh",                GT,     Value(GT, -1.0f, 1.0f),         notUsed,                                        notUsed,                                        1.0f, 0.0f,             PRECMASK_MEDIUMP_HIGHP,         FLOAT_GENTYPE_FUNCS(asinh) )
                << BuiltinFuncInfo("acosh",                     "acosh",                GT,     Value(GT, 1.0f, 2.2f),          notUsed,                                        notUsed,                                        1.0f, 0.0f,             PRECMASK_MEDIUMP_HIGHP,         FLOAT_GENTYPE_FUNCS(acosh) )
-               << BuiltinFuncInfo("atanh",                     "atanh",                GT,     Value(GT, -1.0f, 1.0f),         notUsed,                                        notUsed,                                        1.0f, 0.0f,             PRECMASK_MEDIUMP_HIGHP,         FLOAT_GENTYPE_FUNCS(atanh) )
+               << BuiltinFuncInfo("atanh",                     "atanh",                GT,     Value(GT, -0.99f, 0.99f),       notUsed,                                        notUsed,                                        1.0f, 0.0f,             PRECMASK_MEDIUMP_HIGHP,         FLOAT_GENTYPE_FUNCS(atanh) )
        );
 
        // 8.2 Exponential Functions.
index a030b32..2ca18da 100644 (file)
@@ -331,8 +331,8 @@ bool ShaderFloatPrecisionCase::compare (float in0, float in1, double reference,
        {
                const deUint64  refBits                         = tcu::Float64(reference).bits();
                const deUint64  resBits                         = tcu::Float64(result).bits();
-               const deUint64  accurateRefBits         = maskBits < 32 ? refBits >> maskBits : 0u;
-               const deUint64  accurateResBits         = maskBits < 32 ? resBits >> maskBits : 0u;
+               const deUint64  accurateRefBits         = maskBits < 64 ? refBits >> (deUint64)maskBits : 0u;
+               const deUint64  accurateResBits         = maskBits < 64 ? resBits >> (deUint64)maskBits : 0u;
                const deUint64  ulpDiff                         = (deUint64)de::abs((deInt64)accurateRefBits - (deInt64)accurateResBits);
 
                if (ulpDiff > (deUint64)roundingUlpError)
index c3ad27d..8c80cd7 100644 (file)
@@ -285,7 +285,7 @@ static tcu::Vector<float, 16> arrTo16 (const tcu::Array<float, Size>& arr)
 static string getShaderInfoLog (const glw::Functions& gl, deUint32 shader)
 {
        string                  result;
-       int                             infoLogLen;
+       int                             infoLogLen = 0;
        vector<char>    infoLogBuf;
 
        gl.getShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLen);
@@ -299,7 +299,7 @@ static string getShaderInfoLog (const glw::Functions& gl, deUint32 shader)
 static string getProgramInfoLog (const glw::Functions& gl, deUint32 program)
 {
        string                  result;
-       int                             infoLogLen;
+       int                             infoLogLen = 0;
        vector<char>    infoLogBuf;
 
        gl.getProgramiv(program, GL_INFO_LOG_LENGTH, &infoLogLen);
@@ -1730,7 +1730,7 @@ void ShaderCompilerCase::setShaderSources (deUint32 vertShader, deUint32 fragSha
 bool ShaderCompilerCase::compileShader (deUint32 shader) const
 {
        const glw::Functions& gl = m_context.getRenderContext().getFunctions();
-       GLint status;
+       GLint status = 0;
        gl.compileShader(shader);
        gl.getShaderiv(shader, GL_COMPILE_STATUS, &status);
        return status != 0;
@@ -1739,7 +1739,7 @@ bool ShaderCompilerCase::compileShader (deUint32 shader) const
 bool ShaderCompilerCase::linkAndUseProgram (deUint32 program) const
 {
        const glw::Functions& gl = m_context.getRenderContext().getFunctions();
-       GLint linkStatus;
+       GLint linkStatus = 0;
 
        gl.linkProgram(program);
        gl.getProgramiv(program, GL_LINK_STATUS, &linkStatus);
index 98c10af..53f7416 100644 (file)
@@ -902,6 +902,12 @@ void verifyTexture2DView (tcu::TestContext&                        testContext,
                tcu::Surface                    renderedFrame   (viewport.width, viewport.height);
                tcu::Surface                    referenceFrame  (viewport.width, viewport.height);
 
+               renderParams.baseLevel  = level;
+               renderParams.maxLevel   = level;
+
+               gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, level);
+               gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, level);
+
                computeQuadTexCoord2D(texCoord, tcu::Vec2(0.0f, 0.0f), tcu::Vec2(1.0f, 1.0f));
 
                // Setup base viewport.
@@ -922,6 +928,9 @@ void verifyTexture2DView (tcu::TestContext&                 testContext,
                        log << TestLog::Message << "Image comparison of level " << level << " passed." << TestLog::EndMessage;
        }
 
+       gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
+       gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1000);
+
        gl.bindTexture(GL_TEXTURE_2D, 0);
        GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to unbind texture.");
 }
@@ -1043,6 +1052,12 @@ void verifyTexture3DView (tcu::TestContext&                      testContext,
        {
                const IVec3 levelSize = getLevelSize(info.getTarget(), info.getSize(), level);
 
+               renderParams.baseLevel  = level;
+               renderParams.maxLevel   = level;
+
+               gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, level);
+               gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, level);
+
                for (int slice = 0; slice < levelSize.z(); slice++)
                {
                        const RandomViewport    viewport                (renderContext.getRenderTarget(), levelSize.x(), levelSize.y(), rng.getUint32());
@@ -1072,6 +1087,9 @@ void verifyTexture3DView (tcu::TestContext&                       testContext,
                }
        }
 
+       gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, 0);
+       gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, 1000);
+
        gl.bindTexture(GL_TEXTURE_3D, 0);
        GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to unbind texture.");
 }
@@ -1147,6 +1165,12 @@ void verifyTextureCubemapView (tcu::TestContext&                 testContext,
                if (levelSize.x() < 4 && levelSize.y() < 4)
                        continue;
 
+               renderParams.baseLevel  = level;
+               renderParams.maxLevel   = level;
+
+               gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, level);
+               gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, level);
+
                for (int face = 0; face < 6; face++)
                {
                        const RandomViewport    viewport                (renderContext.getRenderTarget(), levelSize.x(), levelSize.y(), rng.getUint32());
@@ -1176,6 +1200,9 @@ void verifyTextureCubemapView (tcu::TestContext&                  testContext,
                }
        }
 
+       gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, 0);
+       gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, 1000);
+
        gl.bindTexture(GL_TEXTURE_CUBE_MAP, 0);
        GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to unbind texture.");
 }
@@ -1307,6 +1334,12 @@ void verifyTexture2DArrayView (tcu::TestContext&                         testContext,
        {
                const IVec3 levelSize = getLevelSize(info.getTarget(), info.getSize(), level);
 
+               renderParams.baseLevel  = level;
+               renderParams.maxLevel   = level;
+
+               gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BASE_LEVEL, level);
+               gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, level);
+
                for (int layer = 0; layer < levelSize.z(); layer++)
                {
                        const RandomViewport    viewport                (renderContext.getRenderTarget(), levelSize.x(), levelSize.y(), rng.getUint32());
@@ -1335,6 +1368,9 @@ void verifyTexture2DArrayView (tcu::TestContext&                          testContext,
                }
        }
 
+       gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BASE_LEVEL, 0);
+       gl.texParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAX_LEVEL, 1000);
+
        gl.bindTexture(GL_TEXTURE_2D_ARRAY, 0);
        GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to unbind texture.");
 }
index 2c7370b..e8acd2c 100644 (file)
@@ -1644,8 +1644,8 @@ LabelCase::IterateResult LabelCase::iterate (void)
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        const char*     const           msg                     = "This is a debug label";
        GLuint                                  object          = 0;
+       int                                             outlen          = -1;
        char                                    buffer[64];
-       int                                             outlen          = 0;
 
        switch(m_identifier)
        {
@@ -1787,8 +1787,8 @@ SyncLabelCase::IterateResult SyncLabelCase::iterate (void)
 
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        const char*     const           msg                     = "This is a debug label";
+       int                                             outlen          = -1;
        char                                    buffer[64];
-       int                                             outlen          = 0;
 
        glw::GLsync                             sync            = gl.fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
        GLU_EXPECT_NO_ERROR(gl.getError(), "fenceSync");
@@ -1835,10 +1835,10 @@ InitialLabelCase::IterateResult InitialLabelCase::iterate (void)
 
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        tcu::ResultCollector    result          (m_testCtx.getLog(), " // ERROR: ");
+       int                                             outlen          = -1;
        GLuint                                  shader;
        glw::GLsync                             sync;
        char                                    buffer[64];
-       int                                             outlen;
 
        sync = gl.fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
        GLS_COLLECT_GL_ERROR(result, gl.getError(), "fenceSync");
@@ -1917,10 +1917,10 @@ ClearLabelCase::IterateResult ClearLabelCase::iterate (void)
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        tcu::ResultCollector    result          (m_testCtx.getLog(), " // ERROR: ");
        const char*     const           msg                     = "This is a debug label";
+       int                                             outlen          = -1;
        GLuint                                  shader;
        glw::GLsync                             sync;
        char                                    buffer[64];
-       int                                             outlen;
 
        sync = gl.fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
        GLS_COLLECT_GL_ERROR(result, gl.getError(), "fenceSync");
@@ -2011,10 +2011,10 @@ SpecifyWithLengthCase::IterateResult SpecifyWithLengthCase::iterate (void)
        tcu::ResultCollector    result          (m_testCtx.getLog(), " // ERROR: ");
        const char*     const           msg                     = "This is a debug label";
        const char*     const           clipMsg         = "This is a de";
+       int                                             outlen          = -1;
        GLuint                                  shader;
        glw::GLsync                             sync;
        char                                    buffer[64];
-       int                                             outlen;
 
        sync = gl.fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
        GLS_COLLECT_GL_ERROR(result, gl.getError(), "fenceSync");
@@ -2120,10 +2120,10 @@ BufferLimitedLabelCase::IterateResult BufferLimitedLabelCase::iterate (void)
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        tcu::ResultCollector    result          (m_testCtx.getLog(), " // ERROR: ");
        const char*     const           msg                     = "This is a debug label";
+       int                                             outlen          = -1;
        GLuint                                  shader;
        glw::GLsync                             sync;
        char                                    buffer[64];
-       int                                             outlen;
 
        sync = gl.fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
        GLS_COLLECT_GL_ERROR(result, gl.getError(), "fenceSync");
@@ -2349,9 +2349,9 @@ LabelMaxSizeCase::IterateResult LabelMaxSizeCase::iterate (void)
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        tcu::ResultCollector    result          (m_testCtx.getLog(), " // ERROR: ");
        int                                             maxLabelLen     = -1;
+       int                                             outlen          = -1;
        GLuint                                  shader;
        glw::GLsync                             sync;
-       int                                             outlen;
 
        gl.getIntegerv(GL_MAX_LABEL_LENGTH, &maxLabelLen);
        GLS_COLLECT_GL_ERROR(result, gl.getError(), "GL_MAX_LABEL_LENGTH");
@@ -2476,9 +2476,9 @@ LabelLengthCase::IterateResult LabelLengthCase::iterate (void)
        const glw::Functions&   gl                      = m_context.getRenderContext().getFunctions();
        tcu::ResultCollector    result          (m_testCtx.getLog(), " // ERROR: ");
        const char*     const           msg                     = "This is a debug label";
+       int                                             outlen          = -1;
        GLuint                                  shader;
        glw::GLsync                             sync;
-       int                                             outlen;
 
        sync = gl.fenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
        GLS_COLLECT_GL_ERROR(result, gl.getError(), "fenceSync");
index ae92528..2f4e60c 100644 (file)
@@ -1940,29 +1940,37 @@ bool GeometryShaderRenderTest::compare (void)
                const int               colorComponentThreshold = 20;
                bool                    testResult                              = true;
 
-               for (int x = 1; x + 1 < m_viewportSize.x(); ++x)
-               for (int y = 1; y + 1 < m_viewportSize.y(); ++y)
+               for (int x = 0; x < m_viewportSize.x(); ++x)
+               for (int y = 0; y < m_viewportSize.y(); ++y)
                {
-                       bool found = false;
-                       const tcu::RGBA refcolor = m_refResult->getPixel(x, y);
-
-                       // Got to find similar pixel near this pixel (3x3 kernel)
-                       for (int dx = -1; dx <= 1; ++dx)
-                       for (int dy = -1; dy <= 1; ++dy)
+                       if (x == 0 || y == 0 || x + 1 == m_viewportSize.x() || y + 1 == m_viewportSize.y())
                        {
-                               const tcu::RGBA         testColor       = m_glResult->getPixel(x + dx, y + dy);
-                               const tcu::IVec4        colDiff         = tcu::abs(testColor.toIVec() - refcolor.toIVec());
+                               // Mark edge pixels as correct since their neighbourhood is undefined
+                               errorMask.setPixel(x, y, green);
+                       }
+                       else
+                       {
+                               const tcu::RGBA refcolor        = m_refResult->getPixel(x, y);
+                               bool                    found           = false;
 
-                               const int                       maxColDiff      = de::max(de::max(colDiff.x(), colDiff.y()), colDiff.z()); // check RGB channels
+                               // Got to find similar pixel near this pixel (3x3 kernel)
+                               for (int dx = -1; dx <= 1; ++dx)
+                               for (int dy = -1; dy <= 1; ++dy)
+                               {
+                                       const tcu::RGBA         testColor       = m_glResult->getPixel(x + dx, y + dy);
+                                       const tcu::IVec4        colDiff         = tcu::abs(testColor.toIVec() - refcolor.toIVec());
 
-                               if (maxColDiff <= colorComponentThreshold)
-                                       found = true;
-                       }
+                                       const int                       maxColDiff      = de::max(de::max(colDiff.x(), colDiff.y()), colDiff.z()); // check RGB channels
+
+                                       if (maxColDiff <= colorComponentThreshold)
+                                               found = true;
+                               }
 
-                       if (!found)
-                               testResult = false;
+                               if (!found)
+                                       testResult = false;
 
-                       errorMask.setPixel(x, y, (found) ? (green) : (red));
+                               errorMask.setPixel(x, y, (found) ? (green) : (red));
+                       }
                }
 
                if (testResult)
index 24a5f25..775b7d1 100644 (file)
@@ -369,14 +369,19 @@ FramebufferMinimumValueCase::IterateResult FramebufferMinimumValueCase::iterate
        gl.enableLogging(true);
 
        {
-               const tcu::ScopedLogSection     section(m_testCtx.getLog(), "Minimum", "Minimum is " + de::toString(m_minValue));
+               const tcu::ScopedLogSection     section(m_testCtx.getLog(), "Minimum", "Specified minimum is " + de::toString(m_minValue));
 
                verifyStateIntegerMin(result, gl, m_target, m_minValue, m_verifierType);
        }
        {
-               const tcu::ScopedLogSection     section(m_testCtx.getLog(), "Ties", "Tied to " + de::toString(glu::getGettableStateStr(m_tiedTo)));
+               const tcu::ScopedLogSection                             section         (m_testCtx.getLog(), "Ties", "The limit is tied to the value of " + de::toString(glu::getGettableStateStr(m_tiedTo)));
+               StateQueryMemoryWriteGuard<glw::GLint>  tiedToValue;
 
-               verifyStateIntegerEqualToOther(result, gl, m_target, m_tiedTo, m_verifierType);
+               gl.glGetIntegerv(m_tiedTo, &tiedToValue);
+               GLS_COLLECT_GL_ERROR(result, gl.glGetError(), "glGetIntegerv");
+
+               if (tiedToValue.verifyValidity(result))
+                       verifyStateIntegerMin(result, gl, m_target, tiedToValue, m_verifierType);
        }
 
        result.setTestContextResult(m_testCtx);
index 778ef6f..3f061ac 100644 (file)
@@ -2631,6 +2631,7 @@ static bool checkShaderResourceUsage (const ProgramInterfaceDefinition::Program*
                                { GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS,                              usage.numSamplers                                                                               },
                                { GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS,                   usage.numAtomicCounterBuffers                                                   },
                                { GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS,                                  usage.numAtomicCounters                                                                 },
+                               { GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS,                                   usage.numImages                                                                                 },
                                { GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS,                    usage.numShaderStorageBlocks                                                    },
                        };
 
@@ -2660,6 +2661,7 @@ static bool checkShaderResourceUsage (const ProgramInterfaceDefinition::Program*
                                { GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS,                   usage.numSamplers                                                                               },
                                { GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS,                usage.numAtomicCounterBuffers                                                   },
                                { GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS,                               usage.numAtomicCounters                                                                 },
+                               { GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS,                                usage.numImages                                                                                 },
                                { GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS,                 usage.numShaderStorageBlocks                                                    },
                        };
 
index c9c5dbf..73e2cf3 100644 (file)
@@ -5998,10 +5998,12 @@ void UserDefinedIOCase::init (void)
                        DE_ASSERT(numElements != -2);
 
                        if (isArray)
+                       {
+                               // \note: TCS output arrays are always implicitly-sized
                                tcsDeclarations += outMaybePatch + output.declareArray(m_ioType == IO_TYPE_PER_PATCH_ARRAY                      ? de::toString(int(NUM_PER_PATCH_ARRAY_ELEMS))
                                                                                                                                           : m_ioType == IO_TYPE_PER_PATCH_BLOCK_ARRAY  ? de::toString(int(NUM_PER_PATCH_BLOCKS))
-                                                                                                                                          : isExplicitVertexArraySize                                  ? de::toString(int(NUM_OUTPUT_VERTICES))
                                                                                                                                           : "");
+                       }
                        else
                                tcsDeclarations += outMaybePatch + output.declare();
 
index 6891eec..019c526 100644 (file)
@@ -29,6 +29,7 @@
 #include "gluTextureUtil.hpp"
 #include "gluProgramInterfaceQuery.hpp"
 #include "gluPixelTransfer.hpp"
+#include "gluStrUtil.hpp"
 #include "tcuTestLog.hpp"
 #include "glwFunctions.hpp"
 #include "glwEnums.hpp"
@@ -73,6 +74,21 @@ static void checkExtension (const glu::RenderContext& renderCtx, const std::stri
                throw tcu::NotSupportedError(extension + " is not supported");
 }
 
+static void checkLimit (const glu::RenderContext& renderCtx, deUint32 pname, int required)
+{
+       const glw::Functions&   gl                                      = renderCtx.getFunctions();
+       int                                             implementationLimit     = -1;
+       deUint32                                error;
+
+       gl.getIntegerv(pname, &implementationLimit);
+       error = gl.getError();
+
+       if (error != GL_NO_ERROR)
+               throw tcu::TestError("Failed to query " + de::toString(glu::getGettableStateStr(pname)) + " - got " + de::toString(glu::getErrorStr(error)));
+       if (implementationLimit < required)
+               throw tcu::NotSupportedError("Test requires " + de::toString(glu::getGettableStateStr(pname)) + " >= " + de::toString(required) + ", got " + de::toString(implementationLimit));
+}
+
 // Shader utilities
 
 static std::string generateVertexShader (const ShaderSpec& shaderSpec)
@@ -1282,10 +1298,25 @@ static std::string generateVertexShaderForTess (glu::GLSLVersion version)
 class CheckTessSupport
 {
 public:
-       inline CheckTessSupport (const glu::RenderContext& renderCtx)
+       enum Stage
+       {
+               STAGE_CONTROL = 0,
+               STAGE_EVAL,
+       };
+
+       inline CheckTessSupport (const glu::RenderContext& renderCtx, Stage stage)
        {
+               const int numBlockRequired = 2; // highest binding is always 1 (output) i.e. count == 2
+
                if (renderCtx.getType().getAPI().getProfile() == glu::PROFILE_ES)
                        checkExtension(renderCtx, "GL_EXT_tessellation_shader");
+
+               if (stage == STAGE_CONTROL)
+                       checkLimit(renderCtx, GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS, numBlockRequired);
+               else if (stage == STAGE_EVAL)
+                       checkLimit(renderCtx, GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS, numBlockRequired);
+               else
+                       DE_ASSERT(false);
        }
 };
 
@@ -1356,7 +1387,7 @@ static std::string generateEmptyTessEvalShader (glu::GLSLVersion version)
 }
 
 TessControlExecutor::TessControlExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec)
-       : CheckTessSupport      (renderCtx)
+       : CheckTessSupport      (renderCtx, STAGE_CONTROL)
        , BufferIoExecutor      (renderCtx, shaderSpec, glu::ProgramSources()
                                                        << glu::VertexSource(generateVertexShaderForTess(shaderSpec.version))
                                                        << glu::TessellationControlSource(generateTessControlShader(shaderSpec))
@@ -1459,7 +1490,7 @@ std::string TessEvaluationExecutor::generateTessEvalShader (const ShaderSpec& sh
 }
 
 TessEvaluationExecutor::TessEvaluationExecutor (const glu::RenderContext& renderCtx, const ShaderSpec& shaderSpec)
-       : CheckTessSupport      (renderCtx)
+       : CheckTessSupport      (renderCtx, STAGE_EVAL)
        , BufferIoExecutor      (renderCtx, shaderSpec, glu::ProgramSources()
                                                        << glu::VertexSource(generateVertexShaderForTess(shaderSpec.version))
                                                        << glu::TessellationControlSource(generatePassthroughTessControlShader(shaderSpec.version))
index ef3000f..5edbc1a 100644 (file)
@@ -1079,11 +1079,20 @@ void verifyInteger (tcu::ResultCollector& result, QueriedState& state, int expec
 
                case DATATYPE_FLOAT:
                {
-                       const glw::GLfloat reference = (glw::GLfloat)expected;
-                       if (state.getFloatAccess() != reference)
+                       const glw::GLfloat refValueMin = deInt32ToFloatRoundToNegInf(expected);
+                       const glw::GLfloat refValueMax = deInt32ToFloatRoundToPosInf(expected);
+
+                       if (state.getFloatAccess() < refValueMin ||
+                               state.getFloatAccess() > refValueMax ||
+                               deIsNaN(state.getFloatAccess()))
                        {
                                std::ostringstream buf;
-                               buf << "Expected " << reference << ", got " << state.getFloatAccess();
+
+                               if (refValueMin == refValueMax)
+                                       buf << "Expected " << refValueMin << ", got " << state.getFloatAccess();
+                               else
+                                       buf << "Expected in range [" << refValueMin << ", " << refValueMax << "], got " << state.getFloatAccess();
+
                                result.fail(buf.str());
                        }
                        break;
@@ -1147,7 +1156,7 @@ void verifyIntegerMin (tcu::ResultCollector& result, QueriedState& state, int mi
 
                case DATATYPE_FLOAT:
                {
-                       if (state.getFloatAccess() < minValue)
+                       if (state.getFloatAccess() < deInt32ToFloatRoundToNegInf(minValue) || deIsNaN(state.getFloatAccess()))
                        {
                                std::ostringstream buf;
                                buf << "Expected greater or equal to " << minValue << ", got " << state.getFloatAccess();
@@ -1201,7 +1210,7 @@ void verifyIntegerMax (tcu::ResultCollector& result, QueriedState& state, int ma
 
                case DATATYPE_FLOAT:
                {
-                       if (state.getFloatAccess() > maxValue)
+                       if (state.getFloatAccess() > deInt32ToFloatRoundToPosInf(maxValue) || deIsNaN(state.getFloatAccess()))
                        {
                                std::ostringstream buf;
                                buf << "Expected less or equal to " << maxValue << ", got " << state.getFloatAccess();
@@ -1336,7 +1345,7 @@ void verifyFloatMin (tcu::ResultCollector& result, QueriedState& state, float mi
 
                case DATATYPE_FLOAT:
                {
-                       if (state.getFloatAccess() < minValue)
+                       if (state.getFloatAccess() < minValue || deIsNaN(state.getFloatAccess()))
                        {
                                std::ostringstream buf;
                                buf << "Expected greater or equal to " << minValue << ", got " << state.getFloatAccess();
@@ -1390,7 +1399,7 @@ void verifyFloatMax (tcu::ResultCollector& result, QueriedState& state, float ma
 
                case DATATYPE_FLOAT:
                {
-                       if (state.getFloatAccess() > maxValue)
+                       if (state.getFloatAccess() > maxValue || deIsNaN(state.getFloatAccess()))
                        {
                                std::ostringstream buf;
                                buf << "Expected less or equal to " << maxValue << ", got " << state.getFloatAccess();
@@ -1614,7 +1623,6 @@ void verifyBooleanVec4 (tcu::ResultCollector& result, QueriedState& state, const
        }
 }
 
-
 void verifyFloatVec4 (tcu::ResultCollector& result, QueriedState& state, const tcu::Vec4& expected)
 {
        switch (state.getType())
index 71bba45..54cb855 100644 (file)
@@ -1817,14 +1817,21 @@ void VertexArrayTest::compare (void)
 
                m_isOk = true;
 
-               for (int y = 1; y < ref.getHeight()-1; y++)
+               for (int y = 0; y < ref.getHeight(); y++)
                {
-                       for (int x = 1; x < ref.getWidth()-1; x++)
+                       for (int x = 0; x < ref.getWidth(); x++)
                        {
                                tcu::RGBA       refPixel                = ref.getPixel(x, y);
                                tcu::RGBA       screenPixel             = screen.getPixel(x, y);
                                bool            isOkPixel               = false;
 
+                               if (y == 0 || y + 1 == ref.getHeight() || x == 0 || x + 1 == ref.getWidth())
+                               {
+                                       // Don't check borders since the pixel neighborhood is undefined
+                                       error.setPixel(x, y, tcu::RGBA(screenPixel.getRed(), (screenPixel.getGreen() + 255) / 2, screenPixel.getBlue(), 255));
+                                       continue;
+                               }
+
                                // Don't do comparisons for this pixel if it belongs to a one-pixel-thin part (i.e. it doesn't have similar-color neighbors in both x and y directions) in both result and reference.
                                // This fixes some false negatives.
                                bool            refThin                 = (!tcu::compareThreshold(refPixel, ref.getPixel(x-1, y  ), threshold) && !tcu::compareThreshold(refPixel, ref.getPixel(x+1, y  ), threshold)) ||
index f2bc06c..5f58c00 100644 (file)
@@ -43,6 +43,7 @@
 
 // debase
 #include "deInt32.h"
+#include "deMath.h"
 
 // decpp
 #include "deBlockBuffer.hpp"
@@ -156,6 +157,7 @@ public:
        void init (void)
        {
                addChild(new SelfCheckCase(m_testCtx, "int32",  "deInt32_selfTest()",   deInt32_selfTest));
+               addChild(new SelfCheckCase(m_testCtx, "math",   "deMath_selfTest()",    deMath_selfTest));
        }
 };
 
index 3fd8ff7..8f987f7 100644 (file)
@@ -137,7 +137,7 @@ def readPatternList (filename):
                                ptrns.append(line)
        return ptrns
 
-def applyPatterns (caseList, patterns, op):
+def applyPatterns (caseList, patterns, filename, op):
        matched                 = set()
        errors                  = []
        curList                 = copy(caseList)
@@ -173,15 +173,15 @@ def applyPatterns (caseList, patterns, op):
                print "ERROR: %s: %s" % (reason, pattern)
 
        if len(errors) > 0:
-               die("Found %s invalid patterns" % len(errors))
+               die("Found %s invalid patterns while processing file %s" % (len(errors), filename))
 
        return [c for c in caseList if op(c in matched)]
 
-def applyInclude (caseList, patterns):
-       return applyPatterns(caseList, patterns, lambda b: b)
+def applyInclude (caseList, patterns, filename):
+       return applyPatterns(caseList, patterns, filename, lambda b: b)
 
-def applyExclude (caseList, patterns):
-       return applyPatterns(caseList, patterns, lambda b: not b)
+def applyExclude (caseList, patterns, filename):
+       return applyPatterns(caseList, patterns, filename, lambda b: not b)
 
 def readPatternLists (mustpass):
        lists = {}
@@ -197,10 +197,10 @@ def applyFilters (caseList, patternLists, filters):
        for filter in filters:
                ptrnList = patternLists[filter.filename]
                if filter.type == Filter.TYPE_INCLUDE:
-                       res = applyInclude(res, ptrnList)
+                       res = applyInclude(res, ptrnList, filter.filename)
                else:
                        assert filter.type == Filter.TYPE_EXCLUDE
-                       res = applyExclude(res, ptrnList)
+                       res = applyExclude(res, ptrnList, filter.filename)
        return res
 
 def appendToHierarchy (root, casePath):
@@ -418,7 +418,11 @@ MASTER_EGL_PKG                                     = Package(module = EGL_MODULE, configurations = [
                                          filters               = MASTER_EGL_COMMON_FILTERS),
        ])
 
-MASTER_GLES2_COMMON_FILTERS            = [include("gles2-master.txt"), exclude("gles2-failures.txt")]
+MASTER_GLES2_COMMON_FILTERS            = [
+               include("gles2-master.txt"),
+               exclude("gles2-test-issues.txt"),
+               exclude("gles2-failures.txt")
+       ]
 MASTER_GLES2_PKG                               = Package(module = GLES2_MODULE, configurations = [
                # Master
                Configuration(name                      = "master",