summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml17
-rwxr-xr-x.gitlab-ci/debian-install.sh5
-rw-r--r--CMakeLists.txt1
-rw-r--r--HACKING2
-rw-r--r--README.md2
-rw-r--r--completions/bash/piglit4
-rw-r--r--examples/glsl_parser_test/ReadMe.txt2
-rw-r--r--framework/backends/abstract.py4
-rw-r--r--framework/backends/json.py7
-rw-r--r--framework/backends/junit.py5
-rw-r--r--framework/core.py10
-rw-r--r--framework/dmesg.py2
-rw-r--r--framework/grouptools.py4
-rw-r--r--framework/log.py7
-rw-r--r--framework/monitoring.py2
-rw-r--r--framework/programs/parsers.py2
-rw-r--r--framework/programs/run.py2
-rw-r--r--framework/replay/__init__.py4
-rw-r--r--framework/replay/backends/__init__.py3
-rw-r--r--framework/replay/backends/abstract.py6
-rw-r--r--framework/replay/backends/apitrace.py14
-rw-r--r--framework/replay/backends/gfxreconstruct.py13
-rw-r--r--framework/replay/backends/renderdoc.py2
-rwxr-xr-xframework/replay/backends/renderdoc/renderdoc_dump_images.py9
-rw-r--r--framework/replay/compare_replay.py20
-rw-r--r--framework/replay/download_utils.py13
-rw-r--r--framework/replay/frame_times.py16
-rw-r--r--framework/replay/image_checksum.py2
-rw-r--r--framework/replay/local_file_adapter.py51
-rw-r--r--framework/replay/options.py5
-rw-r--r--framework/replay/programs/checksum.py1
-rw-r--r--framework/replay/programs/compare.py5
-rw-r--r--framework/replay/programs/download.py5
-rw-r--r--framework/replay/programs/dump.py5
-rw-r--r--framework/replay/programs/parsers.py3
-rw-r--r--framework/replay/programs/profile.py4
-rw-r--r--framework/replay/programs/query.py2
-rw-r--r--framework/replay/query_traces_yaml.py78
-rw-r--r--framework/status.py8
-rw-r--r--framework/summary/common.py8
-rw-r--r--framework/summary/feature.py5
-rw-r--r--framework/summary/html_.py2
-rw-r--r--framework/test/base.py7
-rw-r--r--framework/test/deqp.py2
-rw-r--r--framework/test/glsl_parser_test.py2
-rw-r--r--framework/test/opengl.py2
-rw-r--r--framework/test/piglit_test.py7
-rw-r--r--framework/wflinfo.py2
-rw-r--r--functionaltests/framework/replay/programs/test_compare.py16
-rw-r--r--functionaltests/framework/replay/programs/tests/traces.yml14
-rw-r--r--generated_tests/CMakeLists.txt4
-rw-r--r--generated_tests/builtin_function.py8
-rw-r--r--generated_tests/builtin_function_fp64.py8
-rw-r--r--generated_tests/gen_builtin_packing_tests.py2
-rw-r--r--generated_tests/gen_cl_math_builtins.py2
-rw-r--r--generated_tests/gen_cl_vload_tests.py2
-rw-r--r--generated_tests/gen_interface_block_tests.py339
-rw-r--r--generated_tests/gen_variable_index_write_tests.py2
-rw-r--r--generated_tests/gen_vp_tex.py2
-rw-r--r--generated_tests/modules/types.py2
-rw-r--r--generated_tests/random_ubo.py2
-rw-r--r--generated_tests/templates/__init__.py4
-rw-r--r--generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako66
-rw-r--r--generated_tests/templates/gen_variable_index_write_tests/helpers.mako2
-rwxr-xr-xpiglit-resume.py2
-rw-r--r--piglit.conf.example2
-rw-r--r--replayer/README.md4
-rwxr-xr-xself-tests/test-installed-piglit-script-imports-correct-framework-module2
-rw-r--r--tests/cl/api/build-program.c2
-rw-r--r--tests/cl/api/create-context.c2
-rw-r--r--tests/cl/api/create-program-with-source.c6
-rw-r--r--tests/cl/api/enqueue-fill-image.c2
-rw-r--r--tests/cl/api/get-device-info.c4
-rw-r--r--tests/cl/api/get-kernel-work-group-info.c2
-rw-r--r--tests/cl/program/bitcoin-phatk.c2
-rw-r--r--tests/cl/program/execute/builtin/convert/float-convert_long.cl4
-rw-r--r--tests/cl/program/program-tester.c4
-rw-r--r--tests/deqp_gles3.py2
-rw-r--r--tests/egl/egl-ext_egl_image_storage.c114
-rw-r--r--tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c2
-rw-r--r--tests/fast_color_clear/fast-slow-clear-interaction.shader_test2
-rw-r--r--tests/fast_color_clear/non-redundant-clear.shader_test2
-rw-r--r--tests/fbo/fbo-blit-stretch.cpp2
-rw-r--r--tests/fbo/fbo-viewport.c2
-rw-r--r--tests/general/dlist-fdo3129-02.c2
-rw-r--r--tests/general/getactiveattrib.c2
-rw-r--r--tests/general/idtech-extension-strings.c2
-rw-r--r--tests/general/line-aa-width.c2
-rw-r--r--tests/general/object-namespace-pollution.c2
-rw-r--r--tests/general/triangle-rasterization.cpp4
-rw-r--r--tests/glslparsertest/glsl2/gst-gl-sin.frag2
-rw-r--r--tests/glslparsertest/glsl2/parameters-08.vert2
-rw-r--r--tests/glslparsertest/glsl2/return-conversion-03.vert2
-rw-r--r--tests/glslparsertest/glsl2/xreal-lighting-d-omni.vert2
-rw-r--r--tests/glslparsertest/glsl2/xreal-lighting-db-omni.vert2
-rw-r--r--tests/glslparsertest/glsl2/xreal-lighting-dbs-omni.vert2
-rw-r--r--tests/glslparsertest/shaders/CorrectFull.vert2
-rw-r--r--tests/glslparsertest/shaders/CorrectPreprocess5.frag2
-rw-r--r--tests/glslparsertest/shaders/array1.frag2
-rw-r--r--tests/glslparsertest/shaders/function3.frag2
-rw-r--r--tests/glslparsertest/shaders/preprocess1.frag2
-rw-r--r--tests/glslparsertest/shaders/preprocess2.frag2
-rw-r--r--tests/glslparsertest/shaders/preprocess4.frag2
-rw-r--r--tests/glslparsertest/shaders/struct7.frag2
-rw-r--r--tests/glx/glx-multithread-shader-compile.c2
-rw-r--r--tests/hiz/hiz-util.c8
-rw-r--r--tests/llvmpipe/tests/random.h2
-rw-r--r--tests/llvmpipe/utils/framebuffer.h2
-rw-r--r--tests/no_error.py2
-rw-r--r--tests/opengl.py17
-rw-r--r--tests/shaders/built-in-constants.c4
-rw-r--r--tests/shaders/fp-set-01.c4
-rw-r--r--tests/shaders/fp-set-02.c12
-rwxr-xr-xtests/shaders/getuniform-03.c2
-rw-r--r--tests/shaders/glsl-light-model.c2
-rw-r--r--tests/shaders/glsl-link-initializer-03.c2
-rw-r--r--tests/shaders/parser_utils.h4
-rw-r--r--tests/shaders/shader_runner.c2
-rw-r--r--tests/shaders/ssa/fs-while-loop-rotate-value.shader_test2
-rw-r--r--tests/shaders/useshaderprogram-flushverts-1.c2
-rw-r--r--tests/shaders/vp-bad-program.c4
-rw-r--r--tests/spec/CMakeLists.txt1
-rw-r--r--tests/spec/amd_gpu_shader_half_float/CMakeLists.gl.txt14
-rw-r--r--tests/spec/amd_gpu_shader_half_float/CMakeLists.txt1
-rw-r--r--tests/spec/amd_gpu_shader_half_float/half-float-explicit-offset-bufferstorage.c260
-rw-r--r--tests/spec/amd_gpu_shader_half_float/half_float_util.c167
-rw-r--r--tests/spec/amd_gpu_shader_half_float/half_float_util.h33
-rw-r--r--tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test4
-rw-r--r--tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test4
-rw-r--r--tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-indirect-index.shader_test4
-rw-r--r--tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test4
-rw-r--r--tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test2
-rw-r--r--tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field-unsized2.shader_test2
-rw-r--r--tests/spec/arb_arrays_of_arrays/max-binding.c2
-rw-r--r--tests/spec/arb_bindless_texture/errors.c2
-rw-r--r--tests/spec/arb_blend_func_extended/api/error-at-begin.c2
-rw-r--r--tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c2
-rw-r--r--tests/spec/arb_clear_texture/integer.c2
-rw-r--r--tests/spec/arb_clip_control/clip-control-depth-precision.c2
-rw-r--r--tests/spec/arb_clip_control/clip-control.c2
-rw-r--r--tests/spec/arb_compute_shader/compute-and-render-bug-109630.c4
-rw-r--r--tests/spec/arb_copy_image/api_errors.c2
-rw-r--r--tests/spec/arb_copy_image/formats.c6
-rw-r--r--tests/spec/arb_cull_distance/fs-cull-and-clip-distance-different.shader_test2
-rw-r--r--tests/spec/arb_direct_state_access/compressedtextureimage.c2
-rw-r--r--tests/spec/arb_direct_state_access/getcompressedtextureimage.c2
-rw-r--r--tests/spec/arb_direct_state_access/gettextureimage-targets.c2
-rw-r--r--tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-10.frag2
-rw-r--r--tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-11.frag2
-rw-r--r--tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag2
-rw-r--r--tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-10.frag2
-rw-r--r--tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-11.frag2
-rw-r--r--tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-13.frag2
-rw-r--r--tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test2
-rw-r--r--tests/spec/arb_framebuffer_object/GenerateMipmap-versus-READ_FRAMEBUFFER.c2
-rw-r--r--tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c4
-rw-r--r--tests/spec/arb_geometry_shader4/linker/2darray-vertex-index-oob.shader_test2
-rw-r--r--tests/spec/arb_get_program_binary/api-errors.c2
-rw-r--r--tests/spec/arb_get_program_binary/gpb-common.c2
-rw-r--r--tests/spec/arb_get_program_binary/retrievable_hint.c2
-rw-r--r--tests/spec/arb_get_texture_sub_image/errors.c6
-rw-r--r--tests/spec/arb_get_texture_sub_image/get.c2
-rw-r--r--tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-multiple-samplers.shader_test2
-rw-r--r--tests/spec/arb_gpu_shader_fp64/execution/uniform-invalid-operation.c2
-rw-r--r--tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ishr.shader_test2
-rw-r--r--tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ushr.shader_test2
-rw-r--r--tests/spec/arb_gpu_shader_int64/execution/fs-ishr-and-mask.shader_test2
-rw-r--r--tests/spec/arb_gpu_shader_int64/execution/fs-ushr-and-mask.shader_test2
-rw-r--r--tests/spec/arb_internalformat_query2/common.c18
-rw-r--r--tests/spec/arb_internalformat_query2/generic-pname-checks.c2
-rw-r--r--tests/spec/arb_internalformat_query2/max-dimensions.c4
-rw-r--r--tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c2
-rw-r--r--tests/spec/arb_map_buffer_range/map_buffer_range_test.c4
-rw-r--r--tests/spec/arb_occlusion_query/occlusion_query_conform.c4
-rwxr-xr-xtests/spec/arb_program_interface_query/getprogramresourceindex.c2
-rwxr-xr-xtests/spec/arb_program_interface_query/getprogramresourceiv.c2
-rwxr-xr-xtests/spec/arb_program_interface_query/resource-query.c4
-rw-r--r--tests/spec/arb_provoking_vertex/provoking-vertex-initial.c2
-rw-r--r--tests/spec/arb_query_buffer_object/qbo.c4
-rw-r--r--tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp2
-rw-r--r--tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp2
-rw-r--r--tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt1
-rw-r--r--tests/spec/arb_separate_shader_objects/ProgramUniform-coverage.c2
-rw-r--r--tests/spec/arb_separate_shader_objects/api-errors.c2
-rw-r--r--tests/spec/arb_separate_shader_objects/rendezvous_by_location.c8
-rw-r--r--tests/spec/arb_separate_shader_objects/xfb-explicit-location-array.c298
-rw-r--r--tests/spec/arb_shader_atomic_counters/max-counters.c2
-rw-r--r--tests/spec/arb_shader_image_load_store/execution/disable_early_z.shader_test2
-rw-r--r--tests/spec/arb_shader_image_load_store/grid.c2
-rw-r--r--tests/spec/arb_tessellation_shader/execution/compatibility/vs-tcs-tes-clip-vertex-enables.shader_test2
-rw-r--r--tests/spec/arb_tessellation_shader/large-uniforms.c2
-rw-r--r--tests/spec/arb_tessellation_shader/layout-mismatch.c4
-rw-r--r--tests/spec/arb_tessellation_shader/tes-gs-max-output.cpp2
-rw-r--r--tests/spec/arb_texture_barrier/blending-in-shader-arb.c4
-rw-r--r--tests/spec/arb_texture_buffer_object/texture-buffer-size-clamp.c4
-rw-r--r--tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c2
-rw-r--r--tests/spec/arb_texture_storage_multisample/tex-param.c2
-rw-r--r--tests/spec/arb_texture_view/queries.c2
-rw-r--r--tests/spec/arb_timer_query/timestamp-get.c2
-rw-r--r--tests/spec/arb_transform_feedback2/change-objects-while-paused.c2
-rw-r--r--tests/spec/arb_transform_feedback3/begin_end.c2
-rw-r--r--tests/spec/arb_transform_feedback3/set_invalid_varyings.c2
-rw-r--r--tests/spec/arb_transform_feedback3/set_varyings_with_invalid_args.c2
-rw-r--r--tests/spec/arb_transform_feedback_overflow_query/basic.c2
-rw-r--r--tests/spec/arb_vertex_program/get-limits-without-fp.c2
-rw-r--r--tests/spec/arb_viewport_array/bounds.c6
-rw-r--r--tests/spec/arb_viewport_array/queries.c2
-rw-r--r--tests/spec/arb_viewport_array/render_scissor.c4
-rw-r--r--tests/spec/arb_viewport_array/viewport_indices.c2
-rw-r--r--tests/spec/ext_clear_texture/base-formats.c2
-rw-r--r--tests/spec/ext_disjoint_timer_query/simple-query.c4
-rw-r--r--tests/spec/ext_external_objects/vk_vert_buf_update_errors.c2
-rw-r--r--tests/spec/ext_framebuffer_multisample/accuracy.cpp4
-rw-r--r--tests/spec/ext_framebuffer_multisample/blit-multiple-render-targets.cpp2
-rw-r--r--tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp4
-rw-r--r--tests/spec/ext_framebuffer_multisample/fast-clear.c2
-rw-r--r--tests/spec/ext_framebuffer_multisample/sample-coverage.cpp2
-rw-r--r--tests/spec/ext_image_dma_buf_import/export.c2
-rw-r--r--tests/spec/ext_image_dma_buf_import/reimport-bug.c2
-rw-r--r--tests/spec/ext_occlusion_query_boolean/any-samples.c2
-rw-r--r--tests/spec/ext_texture_env_combine/combine.c4
-rw-r--r--tests/spec/ext_texture_swizzle/depth_texture_mode_and_swizzle.c2
-rw-r--r--tests/spec/ext_transform_feedback/builtin-varyings.c29
-rw-r--r--tests/spec/ext_transform_feedback/discard-bitmap.c2
-rw-r--r--tests/spec/ext_transform_feedback/discard-clear.c2
-rw-r--r--tests/spec/ext_transform_feedback/discard-copypixels.c2
-rw-r--r--tests/spec/ext_transform_feedback/discard-drawarrays.c2
-rw-r--r--tests/spec/ext_transform_feedback/discard-drawpixels.c2
-rw-r--r--tests/spec/ext_transform_feedback/negative-prims.c2
-rw-r--r--tests/spec/ext_transform_feedback/order.c2
-rw-r--r--tests/spec/ext_transform_feedback/structs.c2
-rw-r--r--tests/spec/ext_transform_feedback/tessellation.c4
-rw-r--r--tests/spec/gl-1.0/logicop.c12
-rw-r--r--tests/spec/gl-1.0/no-op-paths.c2
-rw-r--r--tests/spec/gl-1.0/rendermode-feedback.c2
-rw-r--r--tests/spec/gl-1.1/drawarrays-vertex-count.c2
-rw-r--r--tests/spec/gl-2.0/glsl-link-empty-prog.c2
-rw-r--r--tests/spec/gl-2.0/large-point-fs.c2
-rw-r--r--tests/spec/gl-2.1/pbo.c2
-rw-r--r--tests/spec/gl-3.0/api/bindfragdata-link-error.c4
-rw-r--r--tests/spec/gl-3.2/adj-prims.c2
-rw-r--r--tests/spec/gl-3.2/layered-rendering/blit.c6
-rw-r--r--tests/spec/gl-3.2/layered-rendering/clear-color.c2
-rw-r--r--tests/spec/gl-3.2/layered-rendering/clear-depth.c4
-rw-r--r--tests/spec/gl-3.2/layered-rendering/framebuffertexture-defaults.c4
-rw-r--r--tests/spec/gl-3.2/layered-rendering/gl-layer-cube-map.c4
-rw-r--r--tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c2
-rw-r--r--tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.frag2
-rw-r--r--tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.vert2
-rw-r--r--tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.frag2
-rw-r--r--tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.vert2
-rw-r--r--tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.frag2
-rw-r--r--tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.vert2
-rw-r--r--tests/spec/glsl-1.10/execution/built-in-matrix-state.c2
-rw-r--r--tests/spec/glsl-1.10/execution/copy-propagation/glsl-copy-propagation-loop-2.shader_test2
-rw-r--r--tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test2
-rw-r--r--tests/spec/glsl-1.10/execution/fs-nested-return-in-loop-nested_in_if.shader_test2
-rw-r--r--tests/spec/glsl-1.10/execution/fs-texture-select.shader_test2
-rw-r--r--tests/spec/glsl-1.10/execution/glsl-override-builtin-2.shader_test2
-rw-r--r--tests/spec/glsl-1.10/execution/vs-loop-complex-with-else-break.shader_test2
-rw-r--r--tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test2
-rw-r--r--tests/spec/glsl-1.10/preprocessor/bogus-extension-test.frag2
-rw-r--r--tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert2
-rw-r--r--tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence.vert2
-rw-r--r--tests/spec/glsl-1.20/execution/clipping/fixed-clip-enables.shader_test2
-rw-r--r--tests/spec/glsl-1.20/execution/clipping/vs-clip-vertex-enables.shader_test2
-rw-r--r--tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test2
-rw-r--r--tests/spec/glsl-1.20/recursion/recursion.c2
-rw-r--r--tests/spec/glsl-1.30/compiler/interpolation-qualifiers/local-smooth-01.frag2
-rw-r--r--tests/spec/glsl-1.30/compiler/storage-qualifiers/function-param-centroid-in-01.frag2
-rw-r--r--tests/spec/glsl-1.30/compiler/storage-qualifiers/local-centroid-in-01.frag2
-rw-r--r--tests/spec/glsl-1.30/compiler/storage-qualifiers/local-in-01.frag2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-all-planes-enabled.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-bulk-assign.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-enables.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-inout-param.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-out-param.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-retval.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-uint-index.shader_test2
-rw-r--r--tests/spec/glsl-1.30/execution/range_analysis_fsat_of_nan.shader_test2
-rw-r--r--tests/spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-enables.shader_test2
-rw-r--r--tests/spec/glsl-1.50/execution/compatibility/clipping/vs-gs-clip-vertex-enables.shader_test2
-rw-r--r--tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-matching-case-2.shader_test2
-rw-r--r--tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp2
-rw-r--r--tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c2
-rw-r--r--tests/spec/glsl-1.50/execution/primitive-id-no-gs-line.shader_test2
-rw-r--r--tests/spec/glsl-1.50/execution/primitive-id-no-gs-point.shader_test2
-rw-r--r--tests/spec/glsl-1.50/execution/vs-input-arrays.c2
-rw-r--r--tests/spec/glsl-1.50/execution/vs-named-block-no-modify.c2
-rw-r--r--tests/spec/glsl-es-1.00/execution/glsl-no-vertex-attribs.shader_test2
-rw-r--r--tests/spec/glx_arb_create_context/invalid-attribute.c2
-rw-r--r--tests/spec/glx_arb_create_context/invalid-gl-version.c2
-rw-r--r--tests/spec/glx_ext_import_context/query-context-info.c2
-rw-r--r--tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicCompSwap-float-NaN.shader_test4
-rw-r--r--tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMax-float-NaN.shader_test28
-rw-r--r--tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMin-float-NaN.shader_test28
-rw-r--r--tests/spec/khr_debug/debug-push-pop-group.c2
-rw-r--r--tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c2
-rw-r--r--tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c2
-rw-r--r--tests/spec/nv_conditional_render/begin-while-active.c2
-rw-r--r--tests/spec/nv_copy_image/formats.c4
-rw-r--r--tests/spec/nv_texture_env_combine4/combine.c2
-rw-r--r--tests/spec/oes_texture_compression_astc/oes_compressed_astc-miptree-3d.c2
-rw-r--r--tests/texturing/compressedteximage.c3
-rw-r--r--tests/texturing/copyteximage.c4
-rw-r--r--tests/texturing/fxt1-teximage.c2
-rw-r--r--tests/texturing/gen-compressed-teximage.c2
-rw-r--r--tests/texturing/gen-nonzero-unit.c2
-rw-r--r--tests/texturing/gen-teximage.c2
-rw-r--r--tests/texturing/gen-texsubimage.c2
-rw-r--r--tests/texturing/getteximage-targets.c2
-rw-r--r--tests/texturing/rg-teximage-common.c2
-rw-r--r--tests/texturing/s3tc-errors.c2
-rw-r--r--tests/texturing/s3tc-teximage.c2
-rw-r--r--tests/texturing/s3tc-texsubimage.c2
-rw-r--r--tests/texturing/shaders/texelFetch.c2
-rw-r--r--tests/texturing/shaders/textureGather.c2
-rw-r--r--tests/texturing/texdepth.c12
-rw-r--r--tests/texturing/teximage-colors.c10
-rw-r--r--tests/util/minmax-test.c2
-rw-r--r--tests/util/piglit-dispatch.c2
-rw-r--r--tests/util/piglit-fbo.cpp2
-rw-r--r--tests/util/piglit-framework-cl-api.h2
-rw-r--r--tests/util/piglit-framework-cl-custom.h2
-rw-r--r--tests/util/piglit-framework-cl-program.h2
-rw-r--r--tests/util/piglit-framework-cl.h6
-rw-r--r--tests/util/piglit-framework-gl.h2
-rw-r--r--tests/util/piglit-framework-gl/README.txt2
-rw-r--r--tests/util/piglit-framework-gl/piglit_wl_framework.c2
-rw-r--r--tests/util/piglit-glx-util.c2
-rw-r--r--tests/util/piglit-matrix.c4
-rw-r--r--tests/util/piglit-util-cl.c14
-rw-r--r--tests/util/piglit-util-cl.h36
-rw-r--r--tests/util/piglit-util-gl.c4
-rw-r--r--tests/util/piglit-util-gl.h2
-rw-r--r--tests/util/piglit-util.c2
-rw-r--r--tests/util/piglit_ktx.c14
-rw-r--r--tests/util/piglit_ktx.h4
-rw-r--r--tox.ini1
-rw-r--r--unittests/framework/backends/schema/piglit-10.json2
-rw-r--r--unittests/framework/backends/schema/piglit-8.json2
-rw-r--r--unittests/framework/backends/schema/piglit-9.json2
-rw-r--r--unittests/framework/backends/shared.py2
-rw-r--r--unittests/framework/backends/test_compression.py8
-rw-r--r--unittests/framework/backends/test_json.py5
-rw-r--r--unittests/framework/backends/test_json_update.py5
-rw-r--r--unittests/framework/backends/test_package.py2
-rw-r--r--unittests/framework/replay/backends/test_package.py2
-rw-r--r--unittests/framework/replay/test_compare_replay.py52
-rw-r--r--unittests/framework/replay/test_frame_times.py44
-rw-r--r--unittests/framework/replay/test_query_traces_yaml.py95
-rw-r--r--unittests/framework/skip.py6
-rw-r--r--unittests/framework/summary/test_feature.py5
-rw-r--r--unittests/framework/test/test_base.py14
-rw-r--r--unittests/framework/test/test_deqp.py2
-rw-r--r--unittests/framework/test/test_opengl.py8
-rw-r--r--unittests/framework/test_core.py2
-rw-r--r--unittests/framework/test_dmesg.py6
-rw-r--r--unittests/framework/test_log.py2
-rw-r--r--unittests/framework/test_results.py4
-rw-r--r--unittests/framework/test_status.py2
-rw-r--r--unittests/framework/test_wflinfo.py2
363 files changed, 2134 insertions, 742 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9e807ca20..a68baf4d5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,7 @@
# with older commits using the same tag.
variables:
FDO_UPSTREAM_REPO: mesa/piglit
- FDO_DISTRIBUTION_TAG: "2021-12-13-use-stable"
+ FDO_DISTRIBUTION_TAG: "2022-09-11-add-isort"
FDO_DISTRIBUTION_VERSION: bullseye-slim
WINDOWS_TAG: "2022-07-27-win2022"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
@@ -23,6 +23,7 @@ include:
stages:
- container
+ - check
- build
- deploy
@@ -77,6 +78,20 @@ windows:
needs: [windows]
image: $WINDOWS_IMAGE
+# CHECK
+linting:
+ stage: check
+ extends:
+ - .use-debian
+ script:
+ - codespell -f -S ".mypy_cache" -L "lod,LOD,inout,nd,ND,valu,VALU,tese,ba,te,nin"
+ - export CHECKPATH=framework/replay # restrict Python checks only on framework/replay for now
+ - isort --check-only $CHECKPATH
+ - flake8 --max-line-length=120 --show-source $CHECKPATH
+ - mypy --ignore-missing-imports --disallow-incomplete-defs $CHECKPATH
+ - pylint --fail-under=8.5 $CHECKPATH
+
+
# BUILD
# Use ccache transparently, and print stats before/after
diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh
index 6e6756349..957df2bc9 100755
--- a/.gitlab-ci/debian-install.sh
+++ b/.gitlab-ci/debian-install.sh
@@ -24,6 +24,8 @@ apt-get install -y \
bison \
ccache \
cmake \
+ codespell \
+ flake8 \
flex \
freeglut3-dev \
g++-multilib \
@@ -31,6 +33,7 @@ apt-get install -y \
gettext \
git \
glslang-tools \
+ isort \
jq \
libdrm-dev \
libegl1-mesa-dev \
@@ -43,6 +46,7 @@ apt-get install -y \
libxkbcommon-dev \
libxrender-dev \
mingw-w64 \
+ mypy \
ninja-build \
ocl-icd-opencl-dev \
pkg-config \
@@ -64,6 +68,7 @@ apt-get install -y \
python3-setuptools \
python3-wheel \
python3-yaml \
+ pylint \
tox \
waffle-utils \
$EPHEMERAL
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1aeb5ddf..e9015651f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -482,6 +482,7 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(fcntl.h HAVE_FCNTL_H)
check_include_file(linux/sync_file.h HAVE_LINUX_SYNC_FILE_H)
+check_include_file(endian.h HAVE_ENDIAN_H)
if(DEFINED PIGLIT_INSTALL_VERSION)
set(PIGLIT_INSTALL_VERSION_SUFFIX
diff --git a/HACKING b/HACKING
index 8fcc2b1b5..92ad28839 100644
--- a/HACKING
+++ b/HACKING
@@ -188,7 +188,7 @@ access; that way once your patch has been revised to meet our
standards of correctness and coding style, we will know that we should
commit it for you. If we forget, please remind us! Once you have
successfully contributed a handful of patches, feel free to apply for
-commit access usind the process described here:
+commit access using the process described here:
http://www.freedesktop.org/wiki/AccountRequests/
Please be patient--most of us develop graphics drivers (such as Mesa)
diff --git a/README.md b/README.md
index 10a4067f9..c9105025b 100644
--- a/README.md
+++ b/README.md
@@ -39,8 +39,6 @@ First of all, you need to make sure that the following are installed:
Optionally, you can install the following:
- lxml. An accelerated python xml library using libxml2 (http://lxml.de/)
- - simplejson. A fast C based implementation of the python json library.
- (https://simplejson.readthedocs.org/en/latest/)
- jsonstreams. A JSON stream writer for python.
(https://jsonstreams.readthedocs.io/en/stable/)
- VkRunner. A shader script testing tool for Vulkan.
diff --git a/completions/bash/piglit b/completions/bash/piglit
index f0bea2817..87aeb9c95 100644
--- a/completions/bash/piglit
+++ b/completions/bash/piglit
@@ -242,7 +242,7 @@ __piglit_summary_console() {
# Completions for 'summary csv'
#
# This is super simple, it has basically no switches, and the one positional
-# arugment can be provided multiple times
+# argument can be provided multiple times
__piglit_summary_csv() {
local cur=${COMP_WORDS[COMP_CWORD]}
local prev=${COMP_WORDS[COMP_CWORD-1]}
@@ -314,7 +314,7 @@ __piglit_summary_feature() {
# Completions for 'piglit summary html'
#
# This is another fairly complex function to complete. It provides two
-# different positional arugments, the first can be specified only once, the
+# different positional arguments, the first can be specified only once, the
# second can be provided an infinite number of times. It also provides a few
# switches that have positional arguments.
__piglit_summary_html() {
diff --git a/examples/glsl_parser_test/ReadMe.txt b/examples/glsl_parser_test/ReadMe.txt
index 21b00a5e6..4a2bcdce9 100644
--- a/examples/glsl_parser_test/ReadMe.txt
+++ b/examples/glsl_parser_test/ReadMe.txt
@@ -1,3 +1,3 @@
This directory holds example test files that can be registered with Piglit
-with ``add_glsl_parser_test()``. For a decription of the the test's
+with ``add_glsl_parser_test()``. For a description of the the test's
behavior and file format, see the docstrings in file glsl_parser_test.py.
diff --git a/framework/backends/abstract.py b/framework/backends/abstract.py
index 74f57603f..1f1456f61 100644
--- a/framework/backends/abstract.py
+++ b/framework/backends/abstract.py
@@ -50,7 +50,7 @@ def write_compressed(filename):
"""
mode = compression.get_mode()
if mode != 'none':
- # if the suffix (final .xxx) is a knwon compression suffix
+ # if the suffix (final .xxx) is a known compression suffix
suffix = os.path.splitext(filename)[1]
if suffix in compression.COMPRESSION_SUFFIXES:
filename = '{}.{}'.format(os.path.splitext(filename)[0], mode)
@@ -79,7 +79,7 @@ class Backend(metaclass=abc.ABCMeta):
def __init__(self, dest, metadata, **kwargs):
""" Generic constructor
- This method should setup the container and open any files or conections
+ This method should setup the container and open any files or connections
as necessary. It should not however, write anything into the backend
store, that job is for the iniitalize method.
diff --git a/framework/backends/json.py b/framework/backends/json.py
index a0126f652..bb7d75efe 100644
--- a/framework/backends/json.py
+++ b/framework/backends/json.py
@@ -27,10 +27,7 @@ import os
import shutil
import sys
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
try:
import jsonstreams
@@ -77,7 +74,7 @@ class JSONBackend(FileBackend):
""" Piglit's native JSON backend
This writes out to piglit's native json backend. This class uses the python
- json module or the simplejson.
+ json module.
This class is atomic, writes either completely fail or completely succeed.
To achieve this it writes individual files for each test and for the
diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 2a721b7f2..075ba7cf5 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -29,10 +29,7 @@ try:
from lxml import etree
except ImportError:
import xml.etree.ElementTree as etree
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
from framework import grouptools, results, exceptions
from framework.core import PIGLIT_CONFIG
diff --git a/framework/core.py b/framework/core.py
index 22e79e963..96502df2b 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -69,7 +69,7 @@ class PiglitConfig(configparser.ConfigParser):
return fallback
def required_get(self, section, option, **kwargs):
- """A version fo self.get that raises PiglitFatalError.
+ """A version of self.get that raises PiglitFatalError.
If self.get returns NoSectionError or NoOptionError then this will
raise a PiglitFatalException, aborting the program.
@@ -133,7 +133,7 @@ def get_option(env_varname, config_option, default=None, required=False):
def check_dir(dirname, failifexists=False, handler=None):
"""Check for the existence of a directory and create it if possible.
- This function will check for the existance of a directory. If that
+ This function will check for the existence of a directory. If that
directory doesn't exist it will try to create it. If the directory does
exist than it does one of two things.
1) If "failifexists" is False (default): it will just return
@@ -173,10 +173,10 @@ def check_dir(dirname, failifexists=False, handler=None):
def collect_system_info():
- """ Get relavent information about the system running piglit
+ """ Get relevant information about the system running piglit
This method runs through a list of tuples, where element 1 is the name of
- the program being run, and elemnt 2 is a command to run (in a form accepted
+ the program being run, and element 2 is a command to run (in a form accepted
by subprocess.Popen)
"""
@@ -194,7 +194,7 @@ def collect_system_info():
result[name] = out.decode('utf-8')
except OSError as e:
# If we get the 'no file or directory' error then pass, that means
- # that the binary isn't installed or isn't relavent to the system.
+ # that the binary isn't installed or isn't relevant to the system.
# If it's any other OSError, then raise
if e.errno != errno.ENOENT and e.errno != errno.EACCES:
raise
diff --git a/framework/dmesg.py b/framework/dmesg.py
index 5112f9bef..37fbdad7b 100644
--- a/framework/dmesg.py
+++ b/framework/dmesg.py
@@ -23,7 +23,7 @@
""" Module implementing classes for reading posix dmesg
Currently this module only has the default DummyDmesg, and a LinuxDmesg.
-The method used on Linux requires that timetamps are enabled, and no other
+The method used on Linux requires that timestamps are enabled, and no other
posix system has timestamps.
On OSX and *BSD one would likely want to implement a system that reads the
diff --git a/framework/grouptools.py b/framework/grouptools.py
index 961d59738..fb7e6c207 100644
--- a/framework/grouptools.py
+++ b/framework/grouptools.py
@@ -112,11 +112,11 @@ def join(first, *args):
wrote a number of implementations and timed them with timeit. I found for
small number of joins (2-10) that str concatenation was quite a bit faster,
at around 100 elements list joining became faster. Since most of piglit's
- use of join is for 2-10 elements I used string concatentation, which is
+ use of join is for 2-10 elements I used string concatenation, which is
coincidentally very similar to the way posixpath.join is implemented.
"""
- # If first happens to be a non-existant value, walk through args until we
+ # If first happens to be a non-existent value, walk through args until we
# find a real value and use that.
args = (a for a in args)
if not first:
diff --git a/framework/log.py b/framework/log.py
index f99e82208..8aafd0865 100644
--- a/framework/log.py
+++ b/framework/log.py
@@ -34,10 +34,7 @@ import threading
import collections
from http.server import HTTPServer, BaseHTTPRequestHandler
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
from framework.core import PIGLIT_CONFIG
from framework import grouptools
@@ -208,7 +205,7 @@ class VerboseLog(QuietLog):
For the verbose logger there are times that one wants both an
overwritten line, and a line that is static. This method adds the
- ability to print a newline charcater at the end of the line.
+ ability to print a newline character at the end of the line.
This is useful for the non-status lines (running: <name>, and <status>:
<name>), since these lines should be be overwritten, but the running
diff --git a/framework/monitoring.py b/framework/monitoring.py
index 1ee557577..b4ed546a2 100644
--- a/framework/monitoring.py
+++ b/framework/monitoring.py
@@ -284,7 +284,7 @@ if os.name == 'posix':
# unless there was no line
self._last_message = lines[-1] if lines else None
except Exception:
- # if an error occured, we consider there are no new messages
+ # if an error occurred, we consider there are no new messages
self._new_messages = []
pass
diff --git a/framework/programs/parsers.py b/framework/programs/parsers.py
index 0287f97e0..b12fd517a 100644
--- a/framework/programs/parsers.py
+++ b/framework/programs/parsers.py
@@ -24,7 +24,7 @@
Much of this module is based on taking advantage of ArgumentParser's parent
argument and it's parse_known_args() method. The idea is that some parts of
parsers can be shared to reduce code duplication, either by parsing the
-argumetns early and acting on them, or by inheriting from a parent object.
+arguments early and acting on them, or by inheriting from a parent object.
"""
diff --git a/framework/programs/run.py b/framework/programs/run.py
index ee4d54476..0ef57bf26 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -48,7 +48,7 @@ def booltype(val):
elif val.lower() in ['true', 'yes', '1']:
return True
raise argparse.ArgumentTypeError(
- 'Case insensitve values of "yes", "no", "false", "true", and "0" or '
+ 'Case insensitive values of "yes", "no", "false", "true", and "0" or '
'"1" are accepted.')
diff --git a/framework/replay/__init__.py b/framework/replay/__init__.py
index 1843a01aa..e38616153 100644
--- a/framework/replay/__init__.py
+++ b/framework/replay/__init__.py
@@ -1,4 +1,5 @@
# coding=utf-8
+# mypy: ignore-errors
#
# Copyright (c) 2014,2016 Intel Corporation
# Copyright © 2020 Valve Corporation.
@@ -29,10 +30,11 @@
# By importing every exported function from each module in the package we
# create a general use API, but allow it to be controlled by setting the
# __all__ in each module
+# flake8: noqa F401,F403
from .compare_replay import *
from .download_utils import *
+from .frame_times import *
from .image_checksum import *
from .options import *
from .query_traces_yaml import *
-from .frame_times import *
diff --git a/framework/replay/backends/__init__.py b/framework/replay/backends/__init__.py
index 8c2e5031f..9c9ed678d 100644
--- a/framework/replay/backends/__init__.py
+++ b/framework/replay/backends/__init__.py
@@ -46,9 +46,8 @@ find the function that a user actually wants.
"""
-import os
import importlib
-
+import os
from os import path
from .register import Registry
diff --git a/framework/replay/backends/abstract.py b/framework/replay/backends/abstract.py
index 937d3a8d1..966fad669 100644
--- a/framework/replay/backends/abstract.py
+++ b/framework/replay/backends/abstract.py
@@ -34,7 +34,6 @@ import abc
import functools
import subprocess
import sys
-
from os import path
from framework import core
@@ -76,18 +75,15 @@ class DumpBackend(metaclass=abc.ABCMeta):
self._output_dir = path.join('trace', OPTIONS.device_name,
path.dirname(self._trace_path))
-
@staticmethod
def log(severity, msg, end='\n'):
print('[dump_trace_images] {}: {}'.format(severity, msg), flush=True,
end=end)
-
@staticmethod
def log_result(msg):
print(msg, flush=True)
-
@staticmethod
def _run_logged_command(cmd, env):
# Explicitly send the stderr to the fd at sys.stderr in case it was
@@ -104,12 +100,10 @@ class DumpBackend(metaclass=abc.ABCMeta):
'[dump_trace_images] Process failed with error code: {}'.format(
ret.returncode))
-
@abc.abstractmethod
def _get_last_frame_call(self):
"""Get the number of the last frame call from the trace"""
-
@abc.abstractmethod
def dump(self):
""" Dump the calls to images from the trace
diff --git a/framework/replay/backends/apitrace.py b/framework/replay/backends/apitrace.py
index bbca8def0..d147d1fa2 100644
--- a/framework/replay/backends/apitrace.py
+++ b/framework/replay/backends/apitrace.py
@@ -27,17 +27,15 @@
""" Module providing an apitrace dump backend for replayer """
-import os
import subprocess
import sys
-
from os import path
from framework import core, exceptions
+
from .abstract import DumpBackend, dump_handler
from .register import Registry
-
_LOOP_TIMES = core.get_option('PIGLIT_REPLAY_LOOP_TIMES',
('replay', 'loop_times'),
default='150')
@@ -119,7 +117,6 @@ class APITraceBackend(DumpBackend):
'Invalid trace_path: "{}" tried to be dumped '
'by the APITraceBackend.\n'.format(self._trace_path))
-
def _get_last_frame_call(self):
cmd_wrapper = self._retrace_cmd[:-1]
if cmd_wrapper:
@@ -137,10 +134,10 @@ class APITraceBackend(DumpBackend):
logoutput = '[dump_trace_images] Running: {}\n'.format(
' '.join(cmd)) + ret.stdout.decode(errors='replace')
print(logoutput)
- for l in reversed(ret.stdout.decode(errors='replace').splitlines()):
- s = l.split(None, 1)
- if s and s[0].isnumeric():
- return int(s[0])
+ for line in reversed(ret.stdout.decode(errors='replace').splitlines()):
+ split = line.split(None, 1)
+ if split and split[0].isnumeric():
+ return int(split[0])
return -1
@dump_handler
@@ -173,6 +170,7 @@ class APITraceBackend(DumpBackend):
ret = _run_command(cmd, None)
return _collect_frame_times(ret.stdout.decode().splitlines())
+
REGISTRY = Registry(
extensions=['.trace', '.trace-dxgi'],
backend=APITraceBackend,
diff --git a/framework/replay/backends/gfxreconstruct.py b/framework/replay/backends/gfxreconstruct.py
index fe735f09e..960074238 100644
--- a/framework/replay/backends/gfxreconstruct.py
+++ b/framework/replay/backends/gfxreconstruct.py
@@ -31,16 +31,16 @@ import os
import re
import subprocess
import sys
+from os import path
from packaging import version
-from os import path
from framework import core, exceptions
+
from . import DumpBackendError
from .abstract import DumpBackend, dump_handler
from .register import Registry
-
__all__ = [
'REGISTRY',
'GFXReconstructBackend',
@@ -52,6 +52,7 @@ _VERSION_RE = re.compile(r'\s*GFXReconstruct Version\s*([0-9]\.[0-9]\.[0-9])')
_TOTAL_FRAMES_RE = re.compile(r'\s*Total frames:\s*([0-9]*)')
+
class GFXReconstructBackend(DumpBackend):
""" replayer's GFXReconstruct dump backend
@@ -86,7 +87,7 @@ class GFXReconstructBackend(DumpBackend):
try:
frames = re.search(_TOTAL_FRAMES_RE, lines[2])
return int(frames.group(1))
- except:
+ except Exception:
return -1
def _check_version(self, gfxrecon_replay_bin):
@@ -97,7 +98,7 @@ class GFXReconstructBackend(DumpBackend):
try:
v = re.search(_VERSION_RE, lines[1])
current = version.Version(v.group(1))
- except:
+ except Exception:
raise DumpBackendError(
'[dump_trace_images] Unable to check the current '
'gfxrecon-replay version.')
@@ -130,8 +131,8 @@ class GFXReconstructBackend(DumpBackend):
self._run_logged_command(cmd, None)
for c in self._calls:
bmp = '{}_frame_{}.bmp'.format(path.join(self._output_dir,
- 'screenshot'),
- c)
+ 'screenshot'),
+ c)
outputfile = '{}-{}.png'.format(outputprefix, c)
print('Writing: {} to {}'.format(bmp, outputfile))
Image.open(bmp).save(outputfile)
diff --git a/framework/replay/backends/renderdoc.py b/framework/replay/backends/renderdoc.py
index c26e4f8ea..a9513613a 100644
--- a/framework/replay/backends/renderdoc.py
+++ b/framework/replay/backends/renderdoc.py
@@ -30,10 +30,10 @@
from os import path
from framework import exceptions
+
from .abstract import DumpBackend, dump_handler
from .register import Registry
-
__all__ = [
'REGISTRY',
'RenderDocBackend',
diff --git a/framework/replay/backends/renderdoc/renderdoc_dump_images.py b/framework/replay/backends/renderdoc/renderdoc_dump_images.py
index db0ada466..b50a7b917 100755
--- a/framework/replay/backends/renderdoc/renderdoc_dump_images.py
+++ b/framework/replay/backends/renderdoc/renderdoc_dump_images.py
@@ -28,20 +28,21 @@ import argparse
import atexit
import os
import shutil
-import sys
import tempfile
from pathlib import Path
+
def cleanup(dirpath):
shutil.rmtree(dirpath)
+
TMP_DIR = tempfile.mkdtemp()
atexit.register(cleanup, TMP_DIR)
RENDERDOC_DEBUG_FILE = TMP_DIR + "/renderdoc.log"
# Needs to be in the environment before importing the module
os.environ['RENDERDOC_DEBUG_LOG_FILE'] = RENDERDOC_DEBUG_FILE
-import renderdoc as rd
+import renderdoc as rd # noqa: E402
def find_draw_with_event_id(controller, event_id):
@@ -69,7 +70,7 @@ def dump_image(controller, event_id, output_dir, tracefile):
return
filepath = Path(output_dir)
- filepath.mkdir(parents = True, exist_ok = True)
+ filepath.mkdir(parents=True, exist_ok=True)
filepath = filepath / (tracefile + "-" + str(int(draw.eventId)) + ".png")
print("Saving image at event ID %d: %s to %s" % (draw.eventId,
@@ -111,7 +112,7 @@ def load_capture(filename):
def renderdoc_dump_images(filename, event_ids, output_dir):
rd.InitialiseReplay(rd.GlobalEnvironment(), [])
- cap, controller = load_capture(filename);
+ cap, controller = load_capture(filename)
tracefile = Path(filename).name
diff --git a/framework/replay/compare_replay.py b/framework/replay/compare_replay.py
index de74010f2..3245075ff 100644
--- a/framework/replay/compare_replay.py
+++ b/framework/replay/compare_replay.py
@@ -23,27 +23,19 @@
#
# SPDX-License-Identifier: MIT
+import json # type: ignore
import os
import shutil
-try:
- import simplejson as json
-except ImportError:
- import json
-
-from enum import Enum, unique
from glob import glob
from os import path
-from framework import core
-from framework import exceptions
-from framework import status
+from framework import core, status
from framework.replay import backends
from framework.replay import query_traces_yaml as qty
from framework.replay.download_utils import ensure_file
from framework.replay.image_checksum import hexdigest_from_image
from framework.replay.options import OPTIONS
-
__all__ = ['from_yaml',
'trace']
@@ -91,13 +83,17 @@ def _check_trace(trace_path, expected_checksum):
json_result['images'] = [
{'image_desc': trace_path,
+ 'checksum_ref': expected_checksum,
+ 'checksum_render': None,
'image_ref': expected_checksum + '.png',
- 'image_render': expected_checksum + '.png'}]
+ 'image_render': None}]
if checksum is None:
- json_result['images'][0]['image_render'] = None
return status.CRASH, json_result
+ json_result['images'][0]['checksum_render'] = checksum
+ json_result['images'][0]['image_render'] = checksum + '.png'
+
if checksum == expected_checksum:
if not OPTIONS.keep_image:
os.remove(image_file)
diff --git a/framework/replay/download_utils.py b/framework/replay/download_utils.py
index 3119a24a2..22504a82b 100644
--- a/framework/replay/download_utils.py
+++ b/framework/replay/download_utils.py
@@ -27,18 +27,19 @@ import base64
import hashlib
import hmac
import xml.etree.ElementTree as ET
-
from email.utils import formatdate
from os import path
from time import time
+from typing import Dict
+
import requests
from requests.adapters import HTTPAdapter, Retry
from requests.utils import requote_uri
from framework import core, exceptions
+from framework.replay.local_file_adapter import LocalFileAdapter
from framework.replay.options import OPTIONS
-
__all__ = ['ensure_file']
minio_credentials = None
@@ -91,7 +92,6 @@ def get_minio_credentials(url):
def get_authorization_headers(url, resource):
minio_key, minio_secret, minio_token = get_minio_credentials(url)
- content_type = 'application/octet-stream'
date = formatdate(timeval=None, localtime=False, usegmt=True)
to_sign = "GET\n\n\n%s\nx-amz-security-token:%s\n/%s/%s" % (date,
minio_token,
@@ -106,7 +106,7 @@ def get_authorization_headers(url, resource):
return headers
-def download(url: str, file_path: str, headers, attempts=2) -> None:
+def download(url: str, file_path: str, headers: Dict[str, str], attempts: int = 2) -> None:
"""Downloads a URL content into a file
:param url: URL to download
@@ -120,9 +120,12 @@ def download(url: str, file_path: str, headers, attempts=2) -> None:
raise_on_redirect=False
)
session = requests.Session()
- adapter = HTTPAdapter(max_retries=retries)
for protocol in ["http://", "https://"]:
+ adapter = HTTPAdapter(max_retries=retries)
session.mount(protocol, adapter)
+ for protocol in ["file://"]:
+ file_adapter = LocalFileAdapter()
+ session.mount(protocol, file_adapter)
with session.get(url,
allow_redirects=True,
diff --git a/framework/replay/frame_times.py b/framework/replay/frame_times.py
index 5b136978c..90a0c67d8 100644
--- a/framework/replay/frame_times.py
+++ b/framework/replay/frame_times.py
@@ -23,24 +23,16 @@
#
# SPDX-License-Identifier: MIT
-from framework.replay.backends.apitrace import APITraceBackend
-try:
- import simplejson as json
-except ImportError:
- import json
-
-from enum import Enum, unique
+import json # type: ignore
from os import path
-from framework import core
from framework import status
from framework.replay import backends
-from framework.replay.backends.apitrace import APITraceBackend
from framework.replay import query_traces_yaml as qty
+from framework.replay.backends.apitrace import APITraceBackend
from framework.replay.download_utils import ensure_file
from framework.replay.options import OPTIONS
-
__all__ = ['from_yaml',
'trace']
@@ -69,9 +61,9 @@ def _run_trace(trace_path):
frame_times = _replay(path.join(OPTIONS.db_path, trace_path))
if frame_times is None:
- print('[frame_times] error')
+ print('[frame_times] error')
else:
- print('[frame_times] {}'.format(len(frame_times)))
+ print(f'[frame_times] {format(len(frame_times))}')
json_result['images'] = [
{'image_desc': trace_path,
diff --git a/framework/replay/image_checksum.py b/framework/replay/image_checksum.py
index f756935d1..b5ef7546a 100644
--- a/framework/replay/image_checksum.py
+++ b/framework/replay/image_checksum.py
@@ -24,8 +24,8 @@
# SPDX-License-Identifier: MIT
from hashlib import md5
-from PIL import Image
+from PIL import Image
__all__ = ['hexdigest_from_image']
diff --git a/framework/replay/local_file_adapter.py b/framework/replay/local_file_adapter.py
new file mode 100644
index 000000000..770e445e3
--- /dev/null
+++ b/framework/replay/local_file_adapter.py
@@ -0,0 +1,51 @@
+import os
+from urllib.request import url2pathname
+
+import requests
+
+
+class LocalFileAdapter(requests.adapters.BaseAdapter):
+ """Protocol Adapter to allow Requests to GET file:// URLs
+ """
+
+ @staticmethod
+ def _chkpath(_, path):
+ """Return an HTTP status for the given filesystem path."""
+ if os.path.isdir(path):
+ return 400, "Path Not A File"
+ if not os.path.isfile(path):
+ return 404, "File Not Found"
+ if not os.access(path, os.R_OK):
+ return 403, "Access Denied"
+
+ return 200, "OK"
+
+ def send(self, req, **kwargs): # pylint: disable=unused-argument
+ """Return the file specified by the given request
+
+ @type req: C{PreparedRequest}
+ """
+ path = os.path.normcase(os.path.normpath(url2pathname(req.path_url)))
+ response = requests.Response()
+
+ response.status_code, response.reason = self._chkpath(req.method, path)
+ if response.status_code == 200 and req.method.lower() != "head":
+ try:
+ response.raw = open(path, "rb")
+ response.raw.release_conn = response.raw.close
+ except (OSError, IOError) as err:
+ response.status_code = 500
+ response.reason = str(err)
+
+ if isinstance(req.url, bytes):
+ response.url = req.url.decode("utf-8")
+ else:
+ response.url = req.url
+
+ response.request = req
+ response.connection = self
+
+ return response
+
+ def close(self):
+ pass
diff --git a/framework/replay/options.py b/framework/replay/options.py
index 23c22f8c3..7196a198c 100644
--- a/framework/replay/options.py
+++ b/framework/replay/options.py
@@ -29,9 +29,7 @@ This is as close to a true global function as python gets.
"""
-import os
import sys
-
from urllib.parse import urlparse
__all__ = ['OPTIONS']
@@ -82,8 +80,7 @@ class _Options(object): # pylint: disable=too-many-instance-attributes
'minio_host': '',
'minio_bucket': '',
'role_session_name': '',
- 'jwt': ''
- }
+ 'jwt': ''}
def clear(self):
"""Reinitialize all values to defaults."""
diff --git a/framework/replay/programs/checksum.py b/framework/replay/programs/checksum.py
index 81e08f690..97f2bfac1 100644
--- a/framework/replay/programs/checksum.py
+++ b/framework/replay/programs/checksum.py
@@ -27,7 +27,6 @@ import argparse
from framework import exceptions
from framework.replay import image_checksum
-
__all__ = ['checksum']
diff --git a/framework/replay/programs/compare.py b/framework/replay/programs/compare.py
index 6015ddea2..9e65af5a1 100644
--- a/framework/replay/programs/compare.py
+++ b/framework/replay/programs/compare.py
@@ -25,11 +25,10 @@
import argparse
from framework import exceptions
-from framework.replay import compare_replay
-from framework.replay import options
from framework.programs import parsers as piglit_parsers
-from . import parsers
+from framework.replay import compare_replay, options
+from . import parsers
__all__ = ['compare']
diff --git a/framework/replay/programs/download.py b/framework/replay/programs/download.py
index 0af2f91f6..8925807cf 100644
--- a/framework/replay/programs/download.py
+++ b/framework/replay/programs/download.py
@@ -25,10 +25,9 @@
import argparse
from framework import exceptions
-from framework.replay import download_utils
-from framework.replay import options
-from . import parsers
+from framework.replay import download_utils, options
+from . import parsers
__all__ = ['download']
diff --git a/framework/replay/programs/dump.py b/framework/replay/programs/dump.py
index 5fc8cecd8..3f10614c0 100644
--- a/framework/replay/programs/dump.py
+++ b/framework/replay/programs/dump.py
@@ -25,11 +25,10 @@
import argparse
from framework import exceptions
-from framework.replay import backends
-from framework.replay import options
from framework.programs import parsers as piglit_parsers
-from . import parsers
+from framework.replay import backends, options
+from . import parsers
__all__ = ['dump']
diff --git a/framework/replay/programs/parsers.py b/framework/replay/programs/parsers.py
index 15749e73f..efb310099 100644
--- a/framework/replay/programs/parsers.py
+++ b/framework/replay/programs/parsers.py
@@ -24,6 +24,7 @@
# SPDX-License-Identifier: MIT
import argparse
+from typing import Any
class FileContentType(argparse.FileType):
@@ -35,7 +36,7 @@ class FileContentType(argparse.FileType):
mode="r", bufsize=bufsize, encoding=encoding, errors=errors
)
- def __call__(self, string: str):
+ def __call__(self, string: str) -> Any:
with super().__call__(string) as open_file:
return open_file.read()
diff --git a/framework/replay/programs/profile.py b/framework/replay/programs/profile.py
index 97f338c38..82f283807 100644
--- a/framework/replay/programs/profile.py
+++ b/framework/replay/programs/profile.py
@@ -26,9 +26,9 @@
import argparse
from framework import exceptions
-from framework.replay import frame_times
-from framework.replay import options
from framework.programs import parsers as piglit_parsers
+from framework.replay import frame_times, options
+
from . import parsers
__all__ = ['profile']
diff --git a/framework/replay/programs/query.py b/framework/replay/programs/query.py
index 977b8f5e8..aaa65f81a 100644
--- a/framework/replay/programs/query.py
+++ b/framework/replay/programs/query.py
@@ -27,8 +27,8 @@ import argparse
from framework import exceptions
from framework.replay import query_traces_yaml as qty
-from . import parsers
+from . import parsers
__all__ = ['query']
diff --git a/framework/replay/query_traces_yaml.py b/framework/replay/query_traces_yaml.py
index e3a27bdad..4338af6ba 100644
--- a/framework/replay/query_traces_yaml.py
+++ b/framework/replay/query_traces_yaml.py
@@ -1,6 +1,6 @@
# coding=utf-8
#
-# Copyright (c) 2019 Collabora Ltd
+# Copyright © 2019, 2022 Collabora Ltd
# Copyright © 2020 Valve Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,17 +23,17 @@
#
# SPDX-License-Identifier: MIT
-import yaml
from os import path
+from typing import Any, Generator, Optional, Union
-from framework import exceptions
+import yaml
+from framework import exceptions
__all__ = ['download_url',
'load_yaml',
'trace_checksum',
- 'trace_devices',
'traces']
@@ -45,19 +45,15 @@ def load_yaml(y):
'Cannot use the provided stream. Is it YAML?')
-def trace_devices(trace):
- try:
- return [e['device'] for e in trace['expectations']]
- except KeyError:
- return []
-
-
-def trace_checksum(trace, device_name):
+def trace_checksum(trace: Any, device_name: Optional[str]) -> str:
+ '''returns checksum of trace'''
try:
- expectation = next(e for e in trace['expectations']
- if e['device'] == device_name)
+ data = trace[device_name]
+ for item, val in data.items():
+ if item == "checksum":
+ return val
+ return ''
- return expectation['checksum']
except StopIteration:
return ''
except KeyError:
@@ -71,41 +67,49 @@ def download_url(y):
return None
-def traces(y, trace_extensions=None, device_name=None, checksum=False):
+def traces(
+ y: Any,
+ trace_extensions: Optional[str] = None,
+ device_name: Optional[str] = None,
+ checksum: Union[str, bool] = False
+) -> Generator[dict, None, None]:
- def _trace_extension(trace_path):
+ def _trace_extension(trace_path: str) -> str:
name, extension = path.splitext(trace_path)
return extension
-
- traces = y.get('traces', []) or []
+ traces = y.get('traces', {}) or {}
if trace_extensions is not None:
extensions = trace_extensions.split(',')
- def _filter_trace_extension(trace):
+ def _filter_trace_extension(trace: str) -> bool:
try:
- return _trace_extension(trace['path']) in extensions
+ return _trace_extension(trace) in extensions
except KeyError:
return False
- traces = [t for t in traces if _filter_trace_extension(t)]
- if device_name is not None:
- traces = [t for t in traces if device_name in trace_devices(t)]
-
- traces = list(traces)
+ traces = {t: data for t, data in traces.items() if _filter_trace_extension(t)}
+
+ for trace_file, devdata in traces.items():
+ for dev, properties in devdata.items():
+ if device_name and (device_name != dev):
+ continue
+ if (
+ properties
+ and "label" in properties
+ and isinstance(properties["label"], list)
+ and {"skip", "hang", "crash", "fail", "unsupported"}.intersection(properties["label"])
+ ):
+ continue
+
+ found_trace = {"path": trace_file}
+ if not checksum:
+ yield found_trace
+ break
- result = list()
- if checksum:
- for t in traces:
- try:
- yield {'path': t['path'],
- 'checksum': trace_checksum(t, device_name)}
- except KeyError:
- yield {}
- else:
- for t in traces:
try:
- yield {'path': t['path']}
+ found_trace["checksum"] = trace_checksum(devdata, device_name)
+ yield found_trace
except KeyError:
yield {}
diff --git a/framework/status.py b/framework/status.py
index 991a8e0d8..94f4f0499 100644
--- a/framework/status.py
+++ b/framework/status.py
@@ -115,12 +115,12 @@ class Status(object):
This class creatse the necessary magic values to use python's rich
comparison methods. This allows two objects to be compared using common
- operators like <. >, ==, etc. It also alows them to be looked up in
+ operators like <. >, ==, etc. It also allows them to be looked up in
containers using ``for x in []`` syntax.
This class is meant to be immutable, it (ab)uses two tools to provide this
psuedo-immutability: the property decorator, and the __slots__ attribute to
- 1: make the three attributes getters, therefor unwritable, and 2: make
+ 1: make the three attributes getters, therefore unwritable, and 2: make
adding additional attributes impossible
Arguments:
@@ -137,7 +137,7 @@ class Status(object):
def __init__(self, name, value, fraction=(0, 1)):
assert isinstance(value, int), type(value)
# The object is immutable, so calling self.foo = foo will raise a
- # TypeError. Using setattr from the parrent object works around this.
+ # TypeError. Using setattr from the parent object works around this.
self.__name = str(name)
self.__value = value
self.__fraction = fraction
@@ -202,7 +202,7 @@ class Status(object):
class NoChangeStatus(Status):
- """ Special sublcass of status that overides rich comparison methods
+ """ Special sublcass of status that overrides rich comparison methods
This special class of a Status is for use with NOTRUN and SKIP, it never
returns that it is a pass or regression
diff --git a/framework/summary/common.py b/framework/summary/common.py
index 2dfce5e62..2728a54ae 100644
--- a/framework/summary/common.py
+++ b/framework/summary/common.py
@@ -47,7 +47,7 @@ class Results(object): # pylint: disable=too-few-public-methods
def get_result(self, name):
"""Get all results for a single test.
- Replace any missing vaules with status.NOTRUN, correctly handles
+ Replace any missing values with status.NOTRUN, correctly handles
subtests.
"""
@@ -133,13 +133,13 @@ class Names(object):
@lazy_property
def regressions(self):
- # By ensureing tha min(x, y) is >= so.PASS we eleminate NOTRUN and SKIP
+ # By ensureing that min(x, y) is >= so.PASS we eliminate NOTRUN and SKIP
# from these pages
return self.__diff(lambda x, y: x < y and min(x, y) >= so.PASS)
@lazy_property
def fixes(self):
- # By ensureing tha min(x, y) is >= so.PASS we eleminate NOTRUN and SKIP
+ # By ensureing that min(x, y) is >= so.PASS we eliminate NOTRUN and SKIP
# from these pages
return self.__diff(lambda x, y: x > y and min(x, y) >= so.PASS)
@@ -296,7 +296,7 @@ def find_diffs(results, tests, comparator, handler=lambda *a: None):
comparator -- a function with the signautre f(x, y), that returns True when
the test should be added to the set of diffs
- Keyword Arguemnts:
+ Keyword Arguments:
handler -- a function with the signature f(names, name, prev, cur). in the
event of a KeyError while comparing the results with comparator,
handler will be passed the (<the set of names>, <the current
diff --git a/framework/summary/feature.py b/framework/summary/feature.py
index bdf13752a..5492a2e8c 100644
--- a/framework/summary/feature.py
+++ b/framework/summary/feature.py
@@ -22,10 +22,7 @@
# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
from framework import profile, status
diff --git a/framework/summary/html_.py b/framework/summary/html_.py
index cd85363e8..8e72be78c 100644
--- a/framework/summary/html_.py
+++ b/framework/summary/html_.py
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-"""Genrate html summaries."""
+"""Generate html summaries."""
import errno
import getpass
diff --git a/framework/test/base.py b/framework/test/base.py
index 79dfd9c5b..cbdac5418 100644
--- a/framework/test/base.py
+++ b/framework/test/base.py
@@ -83,8 +83,7 @@ def is_crash_returncode(returncode):
"""Determine whether the given process return code correspond to a
crash.
"""
- # In python 2 NoneType and other types can be compaired, in python3 this
- # isn't allowed.
+ # In Python 3 isn't allowed to compare NoneType and other types.
if returncode is None:
return False
@@ -346,8 +345,8 @@ class WindowResizeMixin(object):
On gnome (and possible other DE's) the window manager may decide to resize
a window. This causes the test to fail even though otherwise would not.
- This Mixin overides the _run_command method to run the test 5 times, each
- time searching for the string 'Got suprious window resize' in the output,
+ This Mixin overrides the _run_command method to run the test 5 times, each
+ time searching for the string 'Got spurious window resize' in the output,
if it fails to find it it will break the loop and continue.
see: https://bugzilla.gnome.org/show_bug.cgi?id=680214
diff --git a/framework/test/deqp.py b/framework/test/deqp.py
index b9d5e2c03..849ffbd96 100644
--- a/framework/test/deqp.py
+++ b/framework/test/deqp.py
@@ -129,7 +129,7 @@ class DEQPBaseTest(Test, metaclass=abc.ABCMeta):
@abc.abstractproperty
def deqp_bin(self):
- """The path to the exectuable."""
+ """The path to the executable."""
@abc.abstractproperty
def extra_args(self):
diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py
index 45ea439a6..436e2042c 100644
--- a/framework/test/glsl_parser_test.py
+++ b/framework/test/glsl_parser_test.py
@@ -54,7 +54,7 @@ _FORCE_DESKTOP_VERSION = os.environ.get('PIGLIT_FORCE_GLSLPARSER_DESKTOP', False
def _is_gles_version(version):
- """Return True if version is es, otherwsie false."""
+ """Return True if version is es, otherwise false."""
assert not isinstance(version, bytes), \
'{}({})'.format(version, type(version))
diff --git a/framework/test/opengl.py b/framework/test/opengl.py
index 2f1c5e157..4b72bcf1f 100644
--- a/framework/test/opengl.py
+++ b/framework/test/opengl.py
@@ -53,7 +53,7 @@ class FastSkip(object):
One of [gles1, gles2, gles3, core, compat]
extensions -- A set of extensions required
api_version -- The version of the API required
- shader_version -- The versoin of the shader language required
+ shader_version -- The version of the shader language required
"""
__slots__ = ['api', 'extensions', 'api_version', 'shader_version']
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index b85bac0d5..053411e59 100644
--- a/framework/test/piglit_test.py
+++ b/framework/test/piglit_test.py
@@ -28,10 +28,7 @@
import glob
import os
import sys
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
from framework import core, options
from framework import status
@@ -137,7 +134,7 @@ class PiglitGLTest(WindowResizeMixin, PiglitBaseTest):
# What we really want is __init__(self, *args, new_arg=None, **kwargs),
# but this doesn't work in python2. In python3 thanks to PEP3102, you
# can in fact do just that
- # The work around is to explicitely pass the arguments down.
+ # The work around is to explicitly pass the arguments down.
super(PiglitGLTest, self).__init__(command, **kwargs)
assert not (require_platforms and exclude_platforms)
diff --git a/framework/wflinfo.py b/framework/wflinfo.py
index eaaa57d4d..5058a0184 100644
--- a/framework/wflinfo.py
+++ b/framework/wflinfo.py
@@ -269,7 +269,7 @@ class WflInfo(object):
self.__compat_init = True
comp = self.__build_info('compat')
if comp.api_version == 0.0:
- # In this case there are not compat profiles, try agian
+ # In this case there are not compat profiles, try again
# with a "legacy" profile, which could be promoted to
# compat
return self.__build_info('none')
diff --git a/functionaltests/framework/replay/programs/test_compare.py b/functionaltests/framework/replay/programs/test_compare.py
index 22ecc5203..78893108d 100644
--- a/functionaltests/framework/replay/programs/test_compare.py
+++ b/functionaltests/framework/replay/programs/test_compare.py
@@ -1,6 +1,6 @@
# coding=utf-8
#
-# Copyright (c) 2019 Collabora Ltd
+# Copyright © 2019-2022 Collabora Ltd.
# Copyright © 2019-2020 Valve Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -170,10 +170,9 @@ def test_compare_traces_with_and_without_checksum():
filename = "./tests/traces.yml"
content = read_from(filename)
extra = textwrap.dedent('''\
- - path: trace1/red.testtrace
- expectations:
- - device: blah
- checksum: 000000000000000
+ trace1/red.testtrace:
+ blah:
+ checksum: 000000000000000
''')
content += textwrap.indent(extra, ' ')
write_to(content, filename)
@@ -190,10 +189,9 @@ def test_compare_only_traces_without_checksum():
filename = "./tests/traces.yml"
content = textwrap.dedent('''\
traces:
- - path: trace1/red.testtrace
- expectations:
- - device: blah
- checksum: 000000000000000
+ trace1/red.testtrace:
+ blah:
+ checksum: 000000000000000
''')
write_to(content, filename)
diff --git a/functionaltests/framework/replay/programs/tests/traces.yml b/functionaltests/framework/replay/programs/tests/traces.yml
index 64e3e4fce..dfc0a02d7 100644
--- a/functionaltests/framework/replay/programs/tests/traces.yml
+++ b/functionaltests/framework/replay/programs/tests/traces.yml
@@ -1,9 +1,7 @@
traces:
- - path: trace1/magenta.testtrace
- expectations:
- - device: gl-test-device
- checksum: 8e0a801367e1714463475a824dab363b
- - path: trace2/olive.testtrace
- expectations:
- - device: vk-test-device
- checksum: 5efda83854befe0155ff8517a58d5b51
+ trace1/magenta.testtrace:
+ gl-test-device:
+ checksum: 8e0a801367e1714463475a824dab363b
+ trace2/olive.testtrace:
+ vk-test-device:
+ checksum: 5efda83854befe0155ff8517a58d5b51
diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt
index 992a9a0fe..8f610c6c3 100644
--- a/generated_tests/CMakeLists.txt
+++ b/generated_tests/CMakeLists.txt
@@ -227,6 +227,9 @@ piglit_make_generated_tests(
piglit_make_generated_tests(
inout_64bit.list
gen_inout_64bit_tests.py)
+piglit_make_generated_tests(
+ interface_block_tests.list
+ gen_interface_block_tests.py)
# OpenCL Test generators
piglit_make_generated_tests(
@@ -297,6 +300,7 @@ add_custom_target(gen-gl-tests
vs_in_fp64.list
gpu_shader4_tests.list
inout_64bit.list
+ interface_block_tests.list
)
# Create a custom target for generating OpenCL tests
diff --git a/generated_tests/builtin_function.py b/generated_tests/builtin_function.py
index 9dedbdf32..28d8e1fbe 100644
--- a/generated_tests/builtin_function.py
+++ b/generated_tests/builtin_function.py
@@ -743,7 +743,7 @@ def _store_test_vector(test_suite_dict, name, glsl_version, extension, test_vect
glsl_version is adjusted if necessary to reflect when the argument
and return types were introduced into GLSL.
- If template is supplied, it is used insted as the template for the
+ If template is supplied, it is used instead as the template for the
Signature objects generated.
"""
if template is None:
@@ -767,7 +767,7 @@ def _store_test_vectors(test_suite_dict, name, glsl_version, extension,
"""Store multiple test vectors in the appropriate places in
test_suite_dict.
- If template is supplied, it is used insted as the template for the
+ If template is supplied, it is used instead as the template for the
Signature objects generated.
"""
for test_vector in test_vectors:
@@ -1067,7 +1067,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):
return lambda *args: _argument_types_match(args, indices)
def match_simple_binop(x, y):
- """Detemine whether the type of the arguments is compatible
+ """Determine whether the type of the arguments is compatible
for a simple binary operator (such as '+').
Arguments are compatible if one is a scalar and the other is a
@@ -1382,7 +1382,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):
should be used to compute the tolerance for the test vectors.
Otherwise, _strict_tolerance is used.
- If template is supplied, it is used insted as the template for
+ If template is supplied, it is used instead as the template for
the Signature objects generated.
"""
test_inputs = make_arguments(test_inputs)
diff --git a/generated_tests/builtin_function_fp64.py b/generated_tests/builtin_function_fp64.py
index 6776c900d..4e9eb31f5 100644
--- a/generated_tests/builtin_function_fp64.py
+++ b/generated_tests/builtin_function_fp64.py
@@ -619,7 +619,7 @@ def _store_test_vector(test_suite_dict, name, glsl_version, extension, test_vect
glsl_version is adjusted if necessary to reflect when the argument
and return types were introduced into GLSL.
- If template is supplied, it is used insted as the template for the
+ If template is supplied, it is used instead as the template for the
Signature objects generated.
"""
if template is None:
@@ -642,7 +642,7 @@ def _store_test_vectors(test_suite_dict, name, glsl_version, extension,
"""Store multiple test vectors in the appropriate places in
test_suite_dict.
- If template is supplied, it is used insted as the template for the
+ If template is supplied, it is used instead as the template for the
Signature objects generated.
"""
for test_vector in test_vectors:
@@ -863,7 +863,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):
return lambda *args: _argument_types_match(args, indices)
def match_simple_binop(x, y):
- """Detemine whether the type of the arguments is compatible
+ """Determine whether the type of the arguments is compatible
for a simple binary operator (such as '+').
Arguments are compatible if one is a scalar and the other is a
@@ -1086,7 +1086,7 @@ def _make_vector_or_matrix_test_vectors(test_suite_dict):
should be used to compute the tolerance for the test vectors.
Otherwise, _strict_tolerance is used.
- If template is supplied, it is used insted as the template for
+ If template is supplied, it is used instead as the template for
the Signature objects generated.
"""
test_inputs = make_arguments(test_inputs)
diff --git a/generated_tests/gen_builtin_packing_tests.py b/generated_tests/gen_builtin_packing_tests.py
index 9715902a5..e78c2d39c 100644
--- a/generated_tests/gen_builtin_packing_tests.py
+++ b/generated_tests/gen_builtin_packing_tests.py
@@ -944,7 +944,7 @@ def func_info(name, requirements):
- vector_type: The type of the GLSL function's parameter or return value.
E.g., vec4 for a 4x8 function and vec2 for a 2x16 function.
- - requirements: A set of API/extension requirments to be listed in the
+ - requirements: A set of API/extension requirements to be listed in the
.shader_test's [requires] section.
- exact: Whether the generated results must be exact (e.g., 0.0 and 1.0
diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index c934f9ce3..d0c5220f2 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -549,7 +549,7 @@ tests = {
],
'num_out_args' : 2
},
-# FIXME: kernel names are broken, and we cant really compare nans to see if the
+# FIXME: kernel names are broken, and we can't really compare nans to see if the
# code made it
# 'nan' : {
# 'arg_types': [F, U],
diff --git a/generated_tests/gen_cl_vload_tests.py b/generated_tests/gen_cl_vload_tests.py
index 0555e7bab..ad0e087bb 100644
--- a/generated_tests/gen_cl_vload_tests.py
+++ b/generated_tests/gen_cl_vload_tests.py
@@ -160,7 +160,7 @@ def gen_test_local_private(suffix, t, mem_type, vec_sizes, addr_space, aligned):
f.close()
-# vload_half is special, becuase CLC won't allow us to use half type without
+# vload_half is special, because CLC won't allow us to use half type without
# cl_khr_fp16
def gen_test_local_private_half(suffix, t, vec_sizes, addr_space, aligned):
f = begin_test(suffix, t, 'half', vec_sizes, addr_space, aligned)
diff --git a/generated_tests/gen_interface_block_tests.py b/generated_tests/gen_interface_block_tests.py
new file mode 100644
index 000000000..a789d20fc
--- /dev/null
+++ b/generated_tests/gen_interface_block_tests.py
@@ -0,0 +1,339 @@
+#!/usr/bin/env python3
+# coding=utf-8
+
+# Copyright (c) 2020, 2021 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+"""Generate interface block linker tests"""
+
+import os
+import argparse
+from modules import utils
+from textwrap import dedent
+from templates import template_dir
+
+TEMPLATES = template_dir(os.path.basename(os.path.splitext(__file__)[0]))
+
+def get_array_index(size):
+ return "[" + str(size) + "]" if size > 1 else ""
+
+class BasicType(object):
+ def __init__(self, type_name, subtype=None, size=0, array_size=1, qualifiers=''):
+ self.size = size
+ self.subtype = subtype
+ self._qualifiers = qualifiers
+ self.array_size = array_size
+ self.name = type_name
+
+ def __str__(self):
+ return "{}{}".format(self.name, get_array_index(self.array_size))
+
+ def qualifiers(self):
+ all = set()
+ base_type = self
+ while base_type is not None:
+ all.add(base_type._qualifiers)
+ base_type = base_type.subtype
+ result = " ".join(all).strip()
+ return result + " " if len(result) else ""
+
+ def depth(self):
+ count = 0
+ base_type = self
+ while base_type.has_subtype():
+ base_type = base_type.subtype
+ count += 1
+ return count
+
+ def has_subtype(self):
+ return self.subtype is not None
+
+ def is_array(self):
+ return self.array_size > 1
+
+
+def apply_indent(text, prefix):
+ result = ""
+ for line in text.split('\n'):
+ if len(line):
+ result += "{}{}\n".format(prefix, line)
+ return result.strip("\n")
+
+
+def save_shader_text(filepath, shader_text):
+ with open(filepath, 'w') as test_file:
+ test_file.write(shader_text)
+
+
+def get_tests_path(folder):
+ return os.path.join("spec", "arb_enhanced_layouts", folder)
+
+
+def get_index_var_name(dim):
+ return chr(ord('a') + dim)
+
+
+def get_layout(location_idx):
+ return "layout(location = {}) ".format(location_idx) if location_idx else ""
+
+
+def generate_assignment(base_type, dst, src):
+ deref = ""
+ dimension = 0
+ dimension_num = base_type.depth()
+ while base_type.has_subtype():
+ if base_type.is_array():
+ deref += "[a]"
+ deref += "[{}]".format(get_index_var_name(dimension_num - dimension))
+ base_type = base_type.subtype
+ dimension += 1
+ # `convert` is a predefined function in mako file
+ return "{dst} += convert({src}{deref});".format(dst=dst, src=src,
+ deref=deref)
+
+def generate_conversion_func(base_type):
+ gen_text_mask="""\
+ for (int {idx} = {start}; {idx} < {len}; {idx}++) {{
+ {inner_text}
+ }}"""
+
+ root_type = base_type
+ dimension = 0
+ dimension_num = base_type.depth()
+ loop_code = generate_assignment(base_type, "color", "indata")
+ while base_type.has_subtype():
+ idxname = get_index_var_name(dimension_num - dimension)
+ loop_code = dedent(gen_text_mask).format(idx=idxname,
+ start=0,
+ len=base_type.size,
+ inner_text=apply_indent(loop_code, " " * 4))
+ base_type = base_type.subtype
+ dimension += 1
+
+ if root_type.is_array():
+ loop_code = dedent(gen_text_mask).format(idx='a',
+ start=0,
+ len=root_type.array_size,
+ inner_text=apply_indent(loop_code, " " * 4))
+
+ calc_color = dedent("""\
+ vec4 calc_color(in {} indata{}) {{
+ vec4 color = vec4(0.0);
+ {}
+ return color;
+ }}
+ """).format(root_type.name, get_array_index(root_type.array_size), apply_indent(loop_code, " " * 4))
+ return calc_color
+
+
+def create_args_parser():
+ parser = argparse.ArgumentParser(
+ description="Generate interface block linker tests")
+
+ parser.add_argument(
+ '--script',
+ dest='script',
+ action='store_true',
+ default=False,
+ help="Generate script running the tests (for development)")
+
+ parser.add_argument(
+ '--oob-verbose-mode',
+ dest='oob_verbose_mode',
+ action='store_true',
+ default=False,
+ help="Generate a lot of tests checking the out-of-bounds cases (for development)")
+ return parser
+
+
+class TestEnv(object):
+ def __init__(self, extensions = []):
+ self.extensions = extensions
+
+ def generate_matching_test(self, test_types, filename, block_location):
+ declare_var_template = "{qualifiers}{base_type} {prefix}{var_number}{array_size};\n"
+
+ extensions = ["GL_ARB_enhanced_layouts",
+ "GL_ARB_separate_shader_objects",
+ "GL_ARB_arrays_of_arrays"] + self.extensions
+
+ calc_color_func = ""
+ declare_uniform_types = ""
+ declare_vs_output_types = ""
+ assign_vs_output_types = ""
+ calc_output_color = ""
+
+ unique_types=[]
+ var_number=1
+ for base_type in test_types:
+ declare_uniform_types += declare_var_template.format(qualifiers = "uniform ",
+ base_type = base_type.name,
+ prefix="vs_uniform_",
+ var_number = var_number,
+ array_size = get_array_index(base_type.array_size))
+ declare_vs_output_types += declare_var_template.format(qualifiers = base_type.qualifiers(),
+ base_type = base_type.name,
+ prefix="var_",
+ var_number = var_number,
+ array_size = get_array_index(base_type.array_size))
+ assign_vs_output_types += ("vs_output.var_{var_number} = vs_uniform_{var_number};\n").format(var_number = var_number)
+ calc_output_color += ("fs_output += calc_color(vs_output.var_{var_number});\n").format(var_number = var_number)
+ if str(base_type) not in unique_types:
+ unique_types.append(str(base_type))
+ calc_color_func += generate_conversion_func(base_type)
+ var_number+=1
+
+ templ = TEMPLATES.get_template('basic.shader_test.mako')
+ shadertext = templ.render_unicode(declare_uniform_types=declare_uniform_types,
+ declare_vs_output_types=apply_indent(declare_vs_output_types, " " * 4),
+ assign_vs_output_types=apply_indent(assign_vs_output_types, " " * 4),
+ calc_output_color=apply_indent(calc_output_color, " " * 4),
+ calc_color=calc_color_func,
+ extensions=extensions,
+ layout=get_layout(block_location))
+ save_shader_text(filename, shadertext)
+ print(filename)
+
+ def test_matching(self, test_types, filename):
+ for block_location in [None, 1]:
+ location_name = "_loc_{}".format(block_location) if block_location else ""
+ fullname=get_tests_path("") + filename + location_name + ".shader_test"
+ self.generate_matching_test(test_types, fullname, block_location)
+ return self
+
+
+def main():
+ """Main function."""
+
+ parser = create_args_parser()
+ args = parser.parse_args()
+
+ if args.script:
+ print("#!/bin/bash")
+ print("SHADER_RUNNER=bin/shader_runner")
+
+ utils.safe_makedirs(get_tests_path(""))
+
+ flat_qualifier="flat"
+ ALL_ATTR_TYPES = [
+ BasicType("float"),
+ BasicType("vec2", BasicType("float"), 2),
+ BasicType("vec3", BasicType("float"), 3),
+ BasicType("vec4", BasicType("float"), 4),
+
+ BasicType("int" , qualifiers=flat_qualifier),
+ BasicType("ivec2", BasicType("int"), 2, qualifiers=flat_qualifier),
+ BasicType("ivec3", BasicType("int"), 3, qualifiers=flat_qualifier),
+ BasicType("ivec4", BasicType("int"), 4, qualifiers=flat_qualifier),
+
+ BasicType("uint" , qualifiers=flat_qualifier),
+ BasicType("uvec2", BasicType("uint"), 2, qualifiers=flat_qualifier),
+ BasicType("uvec3", BasicType("uint"), 3, qualifiers=flat_qualifier),
+ BasicType("uvec4", BasicType("uint"), 4, qualifiers=flat_qualifier),
+
+ BasicType("mat2" , BasicType("vec2", BasicType("float"), 2), 2),
+ BasicType("mat3x2", BasicType("vec2", BasicType("float"), 2), 3),
+ BasicType("mat4x2", BasicType("vec2", BasicType("float"), 2), 4),
+
+ BasicType("mat2x3", BasicType("vec3", BasicType("float"), 3), 2),
+ BasicType("mat3" , BasicType("vec3", BasicType("float"), 3), 3),
+ BasicType("mat4x3", BasicType("vec3", BasicType("float"), 3), 4),
+
+ BasicType("mat2x4", BasicType("vec4", BasicType("float"), 4), 2),
+ BasicType("mat3x4", BasicType("vec4", BasicType("float"), 4), 3),
+ BasicType("mat4" , BasicType("vec4", BasicType("float"), 4), 4),
+ ]
+
+ ALL_ATTR_TYPES_FP64 = [
+ BasicType("double", qualifiers=flat_qualifier),
+ BasicType("dvec2", BasicType("double"), 2, qualifiers=flat_qualifier),
+ BasicType("dvec3", BasicType("double"), 3, qualifiers=flat_qualifier),
+ BasicType("dvec4", BasicType("double"), 4, qualifiers=flat_qualifier),
+
+ BasicType("dmat2" , BasicType("dvec2", BasicType("double"), 2), 2, qualifiers=flat_qualifier),
+ BasicType("dmat3x2", BasicType("dvec2", BasicType("double"), 2), 3, qualifiers=flat_qualifier),
+ BasicType("dmat4x2", BasicType("dvec2", BasicType("double"), 2), 4, qualifiers=flat_qualifier),
+
+ BasicType("dmat2x3", BasicType("dvec3", BasicType("double"), 3), 2, qualifiers=flat_qualifier),
+ BasicType("dmat3" , BasicType("dvec3", BasicType("double"), 3), 3, qualifiers=flat_qualifier),
+ BasicType("dmat4x3", BasicType("dvec3", BasicType("double"), 3), 4, qualifiers=flat_qualifier),
+
+ BasicType("dmat2x4", BasicType("dvec4", BasicType("double"), 4), 2, qualifiers=flat_qualifier),
+ BasicType("dmat3x4", BasicType("dvec4", BasicType("double"), 4), 3, qualifiers=flat_qualifier),
+ BasicType("dmat4" , BasicType("dvec4", BasicType("double"), 4), 4, qualifiers=flat_qualifier),
+ ]
+
+ ALL_ATTR_TYPES_64BIT = [
+ BasicType("int64_t", qualifiers=flat_qualifier),
+ BasicType("i64vec2", BasicType("int64_t"), 2, qualifiers=flat_qualifier),
+ BasicType("i64vec3", BasicType("int64_t"), 3, qualifiers=flat_qualifier),
+ BasicType("i64vec4", BasicType("int64_t"), 4, qualifiers=flat_qualifier),
+
+ BasicType("uint64_t", qualifiers=flat_qualifier),
+ BasicType("u64vec2", BasicType("uint64_t"), 2, qualifiers=flat_qualifier),
+ BasicType("u64vec3", BasicType("uint64_t"), 3, qualifiers=flat_qualifier),
+ BasicType("u64vec4", BasicType("uint64_t"), 4, qualifiers=flat_qualifier),
+ ]
+
+
+ for i in range(0, 3, 1):
+ ATTR_TYPES = []
+ for j in range(0 + i, 21 + i, 3):
+ ATTR_TYPES.append(ALL_ATTR_TYPES[j])
+ TestEnv().test_matching(ATTR_TYPES, ("matching_basic_types_{}").format(i + 1))
+
+
+ for i in range(0, 2, 1):
+ ATTR_TYPES = []
+ for j in range(0, 4, 1):
+ ATTR_TYPES.append(ALL_ATTR_TYPES_64BIT[i + 2 * j])
+ TestEnv(["GL_ARB_gpu_shader_int64"]).test_matching(ATTR_TYPES, ("matching_64bit_types_{}").format(i + 1))
+
+ for i in range(0, 3, 1):
+ ATTR_TYPES = [ALL_ATTR_TYPES_FP64[0],
+ ALL_ATTR_TYPES_FP64[1],
+ ALL_ATTR_TYPES_FP64[2],
+ ALL_ATTR_TYPES_FP64[3]]
+
+ ATTR_TYPES.append(ALL_ATTR_TYPES_FP64[4 + i])
+ ATTR_TYPES.append(ALL_ATTR_TYPES_FP64[7 + i])
+ ATTR_TYPES.append(ALL_ATTR_TYPES_FP64[10 + i])
+ TestEnv(["GL_ARB_gpu_shader_fp64"]).test_matching(ATTR_TYPES, ("matching_fp64_types_{}").format(i + 1))
+
+
+ #test https://gitlab.freedesktop.org/mesa/mesa/-/issues/3320
+ ATTR_TYPES = [
+ BasicType("vec2", BasicType("float"), 2),
+ BasicType("vec3", BasicType("float"), 3),
+ BasicType("float" , qualifiers=flat_qualifier),
+ BasicType("vec3", BasicType("float"), 3, array_size=3),
+ BasicType("vec4", BasicType("float"), 4),
+ BasicType("vec3", BasicType("float"), 3),
+ BasicType("vec3", BasicType("float"), 3),
+ ]
+ TestEnv().test_matching(ATTR_TYPES, ("matching_basic_types_custom"))
+
+ #TestEnv(args, ATTR_TYPES, get_tests_path("execution/io-block-oob/basic-types"), [], True).test_oob()
+ #TestEnv(args, ATTR_TYPES_FP64, get_tests_path("execution/io-block-oob/fp64-types"), ["GL_ARB_gpu_shader_fp64"], True).test_oob()
+ #TestEnv(args, ATTR_TYPES_64BIT, get_tests_path("execution/io-block-oob/64bit-types"), ["GL_ARB_gpu_shader_int64"], True).test_oob()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/generated_tests/gen_variable_index_write_tests.py b/generated_tests/gen_variable_index_write_tests.py
index 8b422730b..b0182c4bd 100644
--- a/generated_tests/gen_variable_index_write_tests.py
+++ b/generated_tests/gen_variable_index_write_tests.py
@@ -186,7 +186,7 @@ class TestParams(object):
"""Generate the matrix used in a test section.
This will take the matrix used by the test, and replace specific values
- with sentinal values, and return the matrix as a string.
+ with sentinel values, and return the matrix as a string.
"""
bad = ['666.0', '777.0', '888.0', '999.0']
diff --git a/generated_tests/gen_vp_tex.py b/generated_tests/gen_vp_tex.py
index 7312e6f5c..fa7539ebd 100644
--- a/generated_tests/gen_vp_tex.py
+++ b/generated_tests/gen_vp_tex.py
@@ -41,7 +41,7 @@ def main():
targets_1 = ["1D", "2D", "3D", "CUBE", "RECT", "SHADOW1D", "SHADOW2D"]
- # The ordering in this loop is wierd, it's an artifact of the growth of the
+ # The ordering in this loop is weird, it's an artifact of the growth of the
# original script and is required to ensure that the names of the tests
# don't change
for inst in ["TEX", "TXB", "TXD", "TXF", "TXL", "TXP", "TXQ"]:
diff --git a/generated_tests/modules/types.py b/generated_tests/modules/types.py
index 0486c2fd3..73c21de68 100644
--- a/generated_tests/modules/types.py
+++ b/generated_tests/modules/types.py
@@ -114,7 +114,7 @@ class Type(object):
signed -- True if the type is a signed type
float -- True if the type is a floating point type
size -- The integer size of the type (8, 16, 32, 64, 128, etc)
- name -- A formated string name of the type. (float, double, int64, ...)
+ name -- A formatted string name of the type. (float, double, int64, ...)
"""
def __init__(self, name, integer=False, signed=False, floating=False,
diff --git a/generated_tests/random_ubo.py b/generated_tests/random_ubo.py
index 90e9cea8b..f36b8b310 100644
--- a/generated_tests/random_ubo.py
+++ b/generated_tests/random_ubo.py
@@ -895,7 +895,7 @@ def fudge_type_for_setter(type):
def bit_exact_data(raw_data, type):
"""Several places in the test want bit-exact data for all types.
For integer types, this is just the raw data. For floating point (both
- single and double precission) types, the bit-exact data is the hex
+ single and double precision) types, the bit-exact data is the hex
representation of the IEEE 754 encoding.
"""
if type in ["float", "vec2", "vec3", "vec4",
diff --git a/generated_tests/templates/__init__.py b/generated_tests/templates/__init__.py
index cdc108815..251ab22b0 100644
--- a/generated_tests/templates/__init__.py
+++ b/generated_tests/templates/__init__.py
@@ -56,7 +56,7 @@ def template_file(generator, template):
If the generator uses more than one template use template_dir instead.
Arguments:
- generator -- the name of the generator, which coresponds to the subdir of
+ generator -- the name of the generator, which corresponds to the subdir of
the templates folder.
template -- the name of the template to get. If getting a single template
it's probably template.*.mako, where * is shader_test,
@@ -80,7 +80,7 @@ def template_dir(generator):
This is useful if a generator uses more than one template.
Arguments:
- generator -- the name of the generator, which coresponds to the subdir of
+ generator -- the name of the generator, which corresponds to the subdir of
the templates folder.
"""
diff --git a/generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako b/generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako
new file mode 100644
index 000000000..221a38a3e
--- /dev/null
+++ b/generated_tests/templates/gen_interface_block_tests/basic.shader_test.mako
@@ -0,0 +1,66 @@
+[require]
+GLSL >= 1.50
+% for ext in extensions:
+${ext}
+% endfor
+
+[vertex shader]
+#version 150
+% for ext in extensions:
+#extension ${ext}: require
+% endfor
+
+${declare_uniform_types}
+
+${layout}out VS_OUTPUT {
+${declare_vs_output_types}
+} vs_output;
+
+void main()
+{
+${assign_vs_output_types}
+}
+
+[fragment shader]
+#version 150
+% for ext in extensions:
+#extension ${ext}: require
+% endfor
+
+${layout}in VS_OUTPUT {
+${declare_vs_output_types}
+} vs_output;
+
+out vec4 fs_output;
+
+% if 'GL_ARB_gpu_shader_fp64' in extensions:
+vec4 convert(in double val)
+{
+ return vec4(val);
+}
+% endif
+% if 'GL_ARB_gpu_shader_int64' in extensions:
+vec4 convert(in int64_t val)
+{
+ return vec4(val);
+}
+vec4 convert(in uint64_t val)
+{
+ return vec4(val);
+}
+% endif
+vec4 convert(in float val)
+{
+ return vec4(val);
+}
+
+${calc_color}
+void main()
+{
+ fs_output = vec4(0);
+${calc_output_color}
+}
+
+[test]
+link success
+draw rect -1 -1 2 2
diff --git a/generated_tests/templates/gen_variable_index_write_tests/helpers.mako b/generated_tests/templates/gen_variable_index_write_tests/helpers.mako
index f4236acfc..fc549a65a 100644
--- a/generated_tests/templates/gen_variable_index_write_tests/helpers.mako
+++ b/generated_tests/templates/gen_variable_index_write_tests/helpers.mako
@@ -127,7 +127,7 @@
% if params.array_dim != 0:
*
* NOTE: This test assumes that reads of arrays using non-constant
- * indicies works correctly. If reads and writes happen to fail in an
+ * indices works correctly. If reads and writes happen to fail in an
* identical manner, this test may give false positives.
% endif
*/
diff --git a/piglit-resume.py b/piglit-resume.py
index b665113a9..104d15b45 100755
--- a/piglit-resume.py
+++ b/piglit-resume.py
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-""" Resume an interupted piglit run
+""" Resume an interrupted piglit run
Deprecated compatibility wrapper
diff --git a/piglit.conf.example b/piglit.conf.example
index 78937965b..13b4d44df 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -2,7 +2,7 @@
; Set the opencv_test_ocl_bindir variable to run the OpenCV OpenCL tests.
;opencv_test_ocl_bindir=/home/user/opencv/build/bin
;opencv_workdir=/home/user/opencv/samples/c/
-; Run each subtest individiually to so a result is recored for each subtest.
+; Run each subtest individiually to so a result is recorded for each subtest.
; For example, default behavior:
; opencv/OCL_ML/Kmeans -> Pass
;
diff --git a/replayer/README.md b/replayer/README.md
index d03a21b7c..f2179ba7d 100644
--- a/replayer/README.md
+++ b/replayer/README.md
@@ -151,7 +151,7 @@ Examples:
Unless specified when comparing or dumping, replayer places the
produced artifacts at the `CWD/results` directory. By default, created
images from traces are only stored in case of a checksum
-mismatch. This can be overriden with the `--keep-image` parameter to
+mismatch. This can be overridden with the `--keep-image` parameter to
force storing images, e.g., to get a complete set of reference images.
By default when dumping, only the image corresponding to the last frame
@@ -192,5 +192,5 @@ version of apitrace (and d3dretrace) for Windows which should be
reachable through Windows' `PATH` environment variable.
Alternatively, all of the paths for specific binaries can be set via
-piglit's configuration file or env variables. Check the documenation
+piglit's configuration file or env variables. Check the documentation
at [piglit.conf.example](piglit.conf.example) for further details.
diff --git a/self-tests/test-installed-piglit-script-imports-correct-framework-module b/self-tests/test-installed-piglit-script-imports-correct-framework-module
index 757d059c4..f0a19a400 100755
--- a/self-tests/test-installed-piglit-script-imports-correct-framework-module
+++ b/self-tests/test-installed-piglit-script-imports-correct-framework-module
@@ -14,7 +14,7 @@ PIGLIT_INSTALL_VERSION_CHOICES = [None, '1234']
DESCRIPTION = dedent("""\
Test that the main piglit script, when installed, successfully imports
- the corrrect framework module.
+ the correct framework module.
Failure modes
1. The script fails to find any framework module and dies.
diff --git a/tests/cl/api/build-program.c b/tests/cl/api/build-program.c
index 4e23cc405..d8d10452c 100644
--- a/tests/cl/api/build-program.c
+++ b/tests/cl/api/build-program.c
@@ -54,7 +54,7 @@ const char* strings[] = {
};
const char* invalid_strings[] = {
- "kernel void dummy_kernel {}", // missing brackets intentionaly
+ "kernel void dummy_kernel {}", // missing brackets intentionally
};
const char* empty_strings[] = {
diff --git a/tests/cl/api/create-context.c b/tests/cl/api/create-context.c
index 4999bbf9b..6eb475815 100644
--- a/tests/cl/api/create-context.c
+++ b/tests/cl/api/create-context.c
@@ -256,7 +256,7 @@ piglit_cl_test(const int argc,
if(env->version >= 11) {
test(invalid_context_properties, num_devices, devices, NULL, NULL,
CL_INVALID_PROPERTY, &result,
- "Trigger CL_INVALID_PROPERTY if context property name in poperties is not a supported property name");
+ "Trigger CL_INVALID_PROPERTY if context property name in properties is not a supported property name");
test(multiple_platform_context_properties, num_devices, devices,
NULL, NULL,
CL_INVALID_PROPERTY, &result,
diff --git a/tests/cl/api/create-program-with-source.c b/tests/cl/api/create-program-with-source.c
index f0d6f3c3d..857257b48 100644
--- a/tests/cl/api/create-program-with-source.c
+++ b/tests/cl/api/create-program-with-source.c
@@ -142,7 +142,7 @@ piglit_cl_test(const int argc,
"Create program with 1 source string and defined length");
test(env->context->cl_ctx, 1, &strings[i], NULL,
CL_SUCCESS, &result,
- "Create program with 1 source string and lenghts == NULL");
+ "Create program with 1 source string and lengths == NULL");
/* all, i-th length is 0 */
partial_lengths[i] = 0;
@@ -150,7 +150,7 @@ piglit_cl_test(const int argc,
test(env->context->cl_ctx, 2, strings, partial_lengths,
CL_SUCCESS, &result,
- "Create program with multiple source strings and only some lenghts defined (others are NULL)");
+ "Create program with multiple source strings and only some lengths defined (others are NULL)");
free(partial_lengths);
}
@@ -161,7 +161,7 @@ piglit_cl_test(const int argc,
"Create program with multiple source strings and defined lengths");
test(env->context->cl_ctx, 2, strings, NULL,
CL_SUCCESS, &result,
- "Create program with multiple source strings and lenghts == NULL");
+ "Create program with multiple source strings and lengths == NULL");
/*** Errors ***/
diff --git a/tests/cl/api/enqueue-fill-image.c b/tests/cl/api/enqueue-fill-image.c
index 4de5dcaf3..edb3e0888 100644
--- a/tests/cl/api/enqueue-fill-image.c
+++ b/tests/cl/api/enqueue-fill-image.c
@@ -145,7 +145,7 @@ piglit_cl_test(const int argc,
/*
* fill the host buffer with the pattern
- * for exemple : pattern == 1234
+ * for example : pattern == 1234
*
* 12341234abcdabcd
* 12341234abcdabcd
diff --git a/tests/cl/api/get-device-info.c b/tests/cl/api/get-device-info.c
index 7d2c0c5b3..a0d1e485c 100644
--- a/tests/cl/api/get-device-info.c
+++ b/tests/cl/api/get-device-info.c
@@ -651,9 +651,9 @@ piglit_cl_test(const int argc,
if (env->version >= 12) {
// for some check we need some infos to be read before others
- // piglit-util-cl-enum could be re ordered partialy
+ // piglit-util-cl-enum could be re ordered partially
// the first 10 elements are ok,
- // after that we want to start with dependant stuff
+ // after that we want to start with dependent stuff
int sorted_idx;
cl_device_info *sorted_infos = malloc(sizeof(cl_device_info) * num_device_infos);
memcpy(sorted_infos, device_infos_enum, sizeof(cl_device_info) * 10);
diff --git a/tests/cl/api/get-kernel-work-group-info.c b/tests/cl/api/get-kernel-work-group-info.c
index 9b92497ef..efcc20351 100644
--- a/tests/cl/api/get-kernel-work-group-info.c
+++ b/tests/cl/api/get-kernel-work-group-info.c
@@ -157,7 +157,7 @@ piglit_cl_test(const int argc,
#if defined(CL_VERSION_1_2)
/* CL_KERNEL_GLOBAL_WORK_SIZE query
- * is valid for custom device or build-in kernel
+ * is valid for custom device or built-in kernel
*/
if (kernel_work_group_infos[i] == CL_KERNEL_GLOBAL_WORK_SIZE) {
cl_device_type* dev_type_ptr =
diff --git a/tests/cl/program/bitcoin-phatk.c b/tests/cl/program/bitcoin-phatk.c
index f57d41b27..563483280 100644
--- a/tests/cl/program/bitcoin-phatk.c
+++ b/tests/cl/program/bitcoin-phatk.c
@@ -143,7 +143,7 @@ char *source =
-"//Partial W calculations (used for the begining where only some values are nonzero)\n"
+"//Partial W calculations (used for the beginning where only some values are nonzero)\n"
"#define P1(n) ((rot(W[(n)-2],15u)^rot(W[(n)-2],13u)^((W[(n)-2])>>10U)))\n"
"#define P2(n) ((rot(W[(n)-15],25u)^rot(W[(n)-15],14u)^((W[(n)-15])>>3U)))\n"
diff --git a/tests/cl/program/execute/builtin/convert/float-convert_long.cl b/tests/cl/program/execute/builtin/convert/float-convert_long.cl
index c8baa3845..3aea84f04 100644
--- a/tests/cl/program/execute/builtin/convert/float-convert_long.cl
+++ b/tests/cl/program/execute/builtin/convert/float-convert_long.cl
@@ -9,7 +9,7 @@ local_size: 1 1 1
name: convert_long(float)
kernel_name: test_long
arg_out: 0 buffer long[8] 0 36864 -47104 41943040 -35651584 131 5000000000 -6000000000
-# These values were choosen to exercise all code paths in the generic
+# These values were chosen to exercise all code paths in the generic
# implementation of __fixsfdi in compiler-rt:
# https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/fixsfdi.c
arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0
@@ -25,7 +25,7 @@ arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0
name: convert_ulong(float)
kernel_name: test_ulong
arg_out: 0 buffer ulong[8] 0 36864 47104 41943040 35651584 131 5000000000 9223372036854775808
-# These values were choosen to exercise all code paths in the generic
+# These values were chosen to exercise all code paths in the generic
# implementation of __fixsfdi in compiler-rt:
# https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/fixsfdi.c
arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0
diff --git a/tests/cl/program/program-tester.c b/tests/cl/program/program-tester.c
index f70497b08..97fe64906 100644
--- a/tests/cl/program/program-tester.c
+++ b/tests/cl/program/program-tester.c
@@ -983,7 +983,7 @@ get_test_arg_value(struct test_arg* test_arg, const char* value, size_t length)
size_t i; // index in array
size_t c; // component in element
size_t ra; // offset from the beginning of array
- size_t rb; // offset from the beginning of bufffer
+ size_t rb; // offset from the beginning of buffer
int64_t* int_array = NULL;
uint64_t* uint_array = NULL;
@@ -2180,7 +2180,7 @@ test_kernel(const struct piglit_cl_program_test_config* config,
return PIGLIT_SKIP;
}
- /* Create or use apropriate kernel */
+ /* Create or use appropriate kernel */
if(test.kernel_name == NULL) {
kernel_name = config->kernel_name;
kernel = env->kernel;
diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py
index 6a7806e92..e383e57e4 100644
--- a/tests/deqp_gles3.py
+++ b/tests/deqp_gles3.py
@@ -32,7 +32,7 @@ __all__ = ['profile']
def _deprecated_get(env_, conf_, dep_env=None, dep_conf=('', ''), **kwargs):
- """Attempt to get deprecated values, then modern vaules.
+ """Attempt to get deprecated values, then modern values.
If a deprecated value is found give the user a warning, this uses
deqp_get_option internally for both the deprecated and undeprecated paths,
diff --git a/tests/egl/egl-ext_egl_image_storage.c b/tests/egl/egl-ext_egl_image_storage.c
index 4a052fb86..b2176450f 100644
--- a/tests/egl/egl-ext_egl_image_storage.c
+++ b/tests/egl/egl-ext_egl_image_storage.c
@@ -30,7 +30,7 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_es_version = 31;
+ config.supports_gl_es_version = 30;
PIGLIT_GL_TEST_CONFIG_END
@@ -102,6 +102,113 @@ test_invalid_params(EGLImageKHR egl_image)
}
}
+static bool
+test_invalid_target_dmabuf(EGLDisplay dpy)
+{
+ /*
+ * EXT_EGL_image_storage
+ *
+ * If the EGL image was created using EGL_EXT_image_dma_buf_import,
+ * then the following applies:
+ *
+ * - <target> must be GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES.
+ * Otherwise, the error INVALID_OPERATION is generated.
+ */
+
+ if (!piglit_is_egl_extension_supported(dpy,
+ "EGL_MESA_image_dma_buf_export") &&
+ !piglit_is_egl_extension_supported(dpy,
+ "EGL_EXT_image_dma_buf_import")) {
+ piglit_logi("dma_buf export and/or import ext not available\n");
+ return true;
+ }
+
+ int w = 32, h = 32;
+
+ GLuint tex;
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_3D, tex);
+ glTexStorage3D(GL_TEXTURE_3D, 1, GL_RGBA8, w, h, 1);
+
+ EGLImage img = eglCreateImage(dpy, eglGetCurrentContext(),
+ EGL_GL_TEXTURE_3D, (EGLClientBuffer)(uintptr_t)tex, NULL);
+ if (!img) {
+ piglit_loge("failed to create EGLImage\n");
+ return false;
+ }
+ glDeleteTextures(1, &tex);
+
+ PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC dmabuf_query;
+ PFNEGLEXPORTDMABUFIMAGEMESAPROC dmabuf_export;
+
+ dmabuf_query =
+ (PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) eglGetProcAddress(
+ "eglExportDMABUFImageQueryMESA");
+ dmabuf_export =
+ (PFNEGLEXPORTDMABUFIMAGEMESAPROC) eglGetProcAddress(
+ "eglExportDMABUFImageMESA");
+
+ if (!dmabuf_query || !dmabuf_export) {
+ piglit_loge("could not find extension entrypoints\n");
+ return false;
+ }
+
+ int fourcc = -1;
+ int num_planes = -1;
+ EGLuint64KHR modifier;
+ int fd = -1;
+ EGLint stride = -1;
+ EGLint offset = -1;
+
+ /* Query the image properties, verify fourcc and num planes. */
+ if (!dmabuf_query(dpy, img, &fourcc, &num_planes, &modifier) ||
+ !piglit_check_egl_error(EGL_SUCCESS)) {
+ piglit_loge("failed to query EGLImage dmabuf params\n");
+ return false;
+ }
+
+ /* Export the image, verify success. */
+ if (!dmabuf_export(dpy, img, &fd, &stride, &offset) ||
+ !piglit_check_egl_error(EGL_SUCCESS)) {
+ piglit_loge("failed to export EGLImage dmabuf\n");
+ return false;
+ }
+
+ eglDestroyImage(dpy, img);
+
+ const EGLAttrib attrs[] = {
+ EGL_IMAGE_PRESERVED, EGL_TRUE,
+ EGL_WIDTH, w,
+ EGL_HEIGHT, h,
+ EGL_LINUX_DRM_FOURCC_EXT, fourcc,
+ EGL_DMA_BUF_PLANE0_FD_EXT, fd,
+ EGL_DMA_BUF_PLANE0_OFFSET_EXT, offset,
+ EGL_DMA_BUF_PLANE0_PITCH_EXT, stride,
+ EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, modifier,
+ EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, modifier >> 32,
+ EGL_NONE, EGL_NONE
+ };
+
+ img = eglCreateImage(eglGetCurrentDisplay(), EGL_NO_CONTEXT,
+ EGL_LINUX_DMA_BUF_EXT, (EGLClientBuffer)0, attrs);
+
+ if (!piglit_check_egl_error(EGL_SUCCESS)) {
+ piglit_loge("failed to import dmabuf EGLImage\n");
+ return false;
+ }
+
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_3D, tex);
+ glEGLImageTargetTexStorageEXT(GL_TEXTURE_3D, img, NULL);
+
+ bool ret = piglit_check_gl_error(GL_INVALID_OPERATION);
+
+ eglDestroyImage(dpy, img);
+ glDeleteTextures(1, &tex);
+
+ return ret;
+}
+
void
piglit_init(int argc, char **argv)
{
@@ -208,5 +315,10 @@ piglit_init(int argc, char **argv)
glDeleteTextures(1, &texture_b);
peglDestroyImageKHR(dpy, egl_image);
+ if (!test_invalid_target_dmabuf(dpy)) {
+ fprintf(stderr, "failed to test dma-buf storage\n");
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
piglit_report_result(PIGLIT_PASS);
}
diff --git a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
index 336508e15..97ce6f901 100644
--- a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
+++ b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
@@ -293,7 +293,7 @@ cleanup:
/**
* Verify that eglCreateSyncKHR(), when given an empty attribute list,
- * intializes the sync object's attributes to the correct values.
+ * initializes the sync object's attributes to the correct values.
*
* From the EGL_KHR_fence_sync spec:
*
diff --git a/tests/fast_color_clear/fast-slow-clear-interaction.shader_test b/tests/fast_color_clear/fast-slow-clear-interaction.shader_test
index e3a724cf4..09bf17ca5 100644
--- a/tests/fast_color_clear/fast-slow-clear-interaction.shader_test
+++ b/tests/fast_color_clear/fast-slow-clear-interaction.shader_test
@@ -7,7 +7,7 @@
# that they happen either during rendering or at the time buffer data
# is read (e.g. by glReadPixels). If two fast clears appear in a row,
# the second clear can be elided. But if other rendering (in this
-# case a slow clear) occurrs between the two fast clears, the second
+# case a slow clear) occurs between the two fast clears, the second
# fast clear is necessary, since some of the first fast clear's writes
# may already have been performed.
#
diff --git a/tests/fast_color_clear/non-redundant-clear.shader_test b/tests/fast_color_clear/non-redundant-clear.shader_test
index 208091f26..3e056ae83 100644
--- a/tests/fast_color_clear/non-redundant-clear.shader_test
+++ b/tests/fast_color_clear/non-redundant-clear.shader_test
@@ -6,7 +6,7 @@
# memory writes that would normally be done during a buffer clear so
# that they happen either during rendering or at the time buffer data
# is read (e.g. by glReadPixels). If two fast clears appear in a row,
-# the second clear can be elided. But if rendering occurrs between
+# the second clear can be elided. But if rendering occurs between
# the two fast clears, the second clear is necessary, since some of
# the first clear's writes may already have been performed.
#
diff --git a/tests/fbo/fbo-blit-stretch.cpp b/tests/fbo/fbo-blit-stretch.cpp
index 4beedbe2e..a83288c0f 100644
--- a/tests/fbo/fbo-blit-stretch.cpp
+++ b/tests/fbo/fbo-blit-stretch.cpp
@@ -141,7 +141,7 @@ filter(const TestCase &test, float coord, GLint &coord0, GLint &coord1, float &w
switch (test.filter) {
case GL_NEAREST:
coord0 = roundf(coord);
- // ambigious
+ // ambiguous
assert(fabsf(coord0 - coord) != 0.5f);
weight = 0.0f;
break;
diff --git a/tests/fbo/fbo-viewport.c b/tests/fbo/fbo-viewport.c
index b2e351ce1..df54078ef 100644
--- a/tests/fbo/fbo-viewport.c
+++ b/tests/fbo/fbo-viewport.c
@@ -151,7 +151,7 @@ piglit_display(void)
glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
-#if 0 /* for debug/compare (alternate diplaying Window vs. FBO image) */
+#if 0 /* for debug/compare (alternate displaying Window vs. FBO image) */
{
int i;
glWindowPos2i(0,0);
diff --git a/tests/general/dlist-fdo3129-02.c b/tests/general/dlist-fdo3129-02.c
index fff8eccaa..e905f6819 100644
--- a/tests/general/dlist-fdo3129-02.c
+++ b/tests/general/dlist-fdo3129-02.c
@@ -55,7 +55,7 @@ piglit_display(void)
glColor3fv(color);
- /* Compile a list. Start with two-component vertexes, then, after the
+ /* Compile a list. Start with two-component vertices, then, after the
* first primitive is complete, use a three-component vertex.
* in the list.
*/
diff --git a/tests/general/getactiveattrib.c b/tests/general/getactiveattrib.c
index 0e73f4a3d..767265591 100644
--- a/tests/general/getactiveattrib.c
+++ b/tests/general/getactiveattrib.c
@@ -47,7 +47,7 @@ struct attribute {
* This attribute must be active in the linked shader.
*
* Some attributes must be active and some may or may not be active
- * (becuase a clever compiler could optimize them away. Attributes
+ * (because a clever compiler could optimize them away. Attributes
* that must not be active should not be listed in
* \c test::attributes.
*/
diff --git a/tests/general/idtech-extension-strings.c b/tests/general/idtech-extension-strings.c
index cecd47bde..b6463af9b 100644
--- a/tests/general/idtech-extension-strings.c
+++ b/tests/general/idtech-extension-strings.c
@@ -29,7 +29,7 @@
* For a long time idTech2- and idTech3-based games contained a bug in
* extension string handling. The engine would copy the extension string
* returned by the driver into a buffer on the stack. The engine would not be
- * able to detect the existence of any extensions that occured after the size
+ * able to detect the existence of any extensions that occurred after the size
* of the buffer.
*
* A 2011 Wine bug
diff --git a/tests/general/line-aa-width.c b/tests/general/line-aa-width.c
index 9590c027f..8b5103275 100644
--- a/tests/general/line-aa-width.c
+++ b/tests/general/line-aa-width.c
@@ -31,7 +31,7 @@
* Tests that width 1.0 AA lines are of the appropriate thickness.
*
* The 965 driver was rendering them so that when the line was
- * centered on a pixel it was fullly lit and when it was off the pixel
+ * centered on a pixel it was fully lit and when it was off the pixel
* center neither of the neighbors would be lit at all. It's quite
* ugly.
*/
diff --git a/tests/general/object-namespace-pollution.c b/tests/general/object-namespace-pollution.c
index 03441494c..b1857cb0a 100644
--- a/tests/general/object-namespace-pollution.c
+++ b/tests/general/object-namespace-pollution.c
@@ -161,7 +161,7 @@ lfsr(uint16_t *state)
* Fill some memory with pseudorandom values
*
* Using two seed values, a pair of LFSRs are used to generate pseudorandom
- * values to fill the specified memory buffer. Seprarate invocations with
+ * values to fill the specified memory buffer. Separate invocations with
* identical \c bytes, \c seed1, and \c seed2 parameters will generate
* identical data. This can be used generate data to initialize a buffer and
* regenerate the same data to validate the buffer.
diff --git a/tests/general/triangle-rasterization.cpp b/tests/general/triangle-rasterization.cpp
index 3ebff79cc..c1e1be7e8 100644
--- a/tests/general/triangle-rasterization.cpp
+++ b/tests/general/triangle-rasterization.cpp
@@ -420,7 +420,7 @@ void random_triangle(Triangle& tri)
* which either top, left, bottom or right edges of a triangles 'belong' to it,
* that is, if one of those edges intersects with a fragment center, the
* fragment is produced. Additionally, for 'top' and 'bottom'-type triangles
- * either left or right vertical edges 'belong' to it. Similarily the same is
+ * either left or right vertical edges 'belong' to it. Similarly the same is
* true with horizontal edges and 'left' and 'right'-type triangles.
*
* For example: consider these 8 triangles centered around a fragment center:
@@ -437,7 +437,7 @@ void random_triangle(Triangle& tri)
* and left because all left facing edges 'belong' to it).
*
* This function determines the convention by drawing the 8 triangles shown
- * above in sub-pixel-size into 8 seperate pixels and checks which
+ * above in sub-pixel-size into 8 separate pixels and checks which
* pixel is filled.
*/
void get_filling_convention(void)
diff --git a/tests/glslparsertest/glsl2/gst-gl-sin.frag b/tests/glslparsertest/glsl2/gst-gl-sin.frag
index d917faa65..7b39adc32 100644
--- a/tests/glslparsertest/glsl2/gst-gl-sin.frag
+++ b/tests/glslparsertest/glsl2/gst-gl-sin.frag
@@ -28,7 +28,7 @@
uniform sampler2DRect tex;
vec3 rgb2hsl (vec3 v)
{
-/* TODO: check this algorythm */
+/* TODO: check this algorithm */
float MIN, MAX;
float r, g, b;
float h, l, s;
diff --git a/tests/glslparsertest/glsl2/parameters-08.vert b/tests/glslparsertest/glsl2/parameters-08.vert
index 7a97862aa..8aa6a6ab1 100644
--- a/tests/glslparsertest/glsl2/parameters-08.vert
+++ b/tests/glslparsertest/glsl2/parameters-08.vert
@@ -4,7 +4,7 @@
//
// [end config]
-/* FAIL - size must be speicified for formal parameter arrays
+/* FAIL - size must be specified for formal parameter arrays
*/
float a(float x[], int y)
{
diff --git a/tests/glslparsertest/glsl2/return-conversion-03.vert b/tests/glslparsertest/glsl2/return-conversion-03.vert
index 0d5aa4030..4702d4391 100644
--- a/tests/glslparsertest/glsl2/return-conversion-03.vert
+++ b/tests/glslparsertest/glsl2/return-conversion-03.vert
@@ -9,7 +9,7 @@
* by other sections of this specification."
*
* Neither section 6.1 (Function Definitions) nor section 6.4 (Jumps) make any
- * mention of implicit conversions occuring on the expression of a return
+ * mention of implicit conversions occurring on the expression of a return
* statement.
*/
#version 120
diff --git a/tests/glslparsertest/glsl2/xreal-lighting-d-omni.vert b/tests/glslparsertest/glsl2/xreal-lighting-d-omni.vert
index a9f138b89..6d2b010c2 100644
--- a/tests/glslparsertest/glsl2/xreal-lighting-d-omni.vert
+++ b/tests/glslparsertest/glsl2/xreal-lighting-d-omni.vert
@@ -35,7 +35,7 @@ varying vec4 var_TexAtten;
void main()
{
- // transform vertex position into homogenous clip-space
+ // transform vertex position into homogeneous clip-space
gl_Position = ftransform();
// assign position in object space
diff --git a/tests/glslparsertest/glsl2/xreal-lighting-db-omni.vert b/tests/glslparsertest/glsl2/xreal-lighting-db-omni.vert
index 029164e35..4b1864e13 100644
--- a/tests/glslparsertest/glsl2/xreal-lighting-db-omni.vert
+++ b/tests/glslparsertest/glsl2/xreal-lighting-db-omni.vert
@@ -38,7 +38,7 @@ varying mat3 var_OS2TSMatrix;
void main()
{
- // transform vertex position into homogenous clip-space
+ // transform vertex position into homogeneous clip-space
gl_Position = ftransform();
// assign position in object space
diff --git a/tests/glslparsertest/glsl2/xreal-lighting-dbs-omni.vert b/tests/glslparsertest/glsl2/xreal-lighting-dbs-omni.vert
index 69183a019..e98086729 100644
--- a/tests/glslparsertest/glsl2/xreal-lighting-dbs-omni.vert
+++ b/tests/glslparsertest/glsl2/xreal-lighting-dbs-omni.vert
@@ -39,7 +39,7 @@ varying mat3 var_OS2TSMatrix;
void main()
{
- // transform vertex position into homogenous clip-space
+ // transform vertex position into homogeneous clip-space
gl_Position = ftransform();
// assign position in object space
diff --git a/tests/glslparsertest/shaders/CorrectFull.vert b/tests/glslparsertest/shaders/CorrectFull.vert
index b3ff1e97a..d64ec713d 100644
--- a/tests/glslparsertest/shaders/CorrectFull.vert
+++ b/tests/glslparsertest/shaders/CorrectFull.vert
@@ -59,7 +59,7 @@ struct light7 {
light3 struct_var = light3(5.0);
-// Attribtue variables can only be Global
+// Attribute variables can only be Global
attribute float flt_attrib;
attribute vec2 vec2_attrib;
attribute vec3 vec3_attrib;
diff --git a/tests/glslparsertest/shaders/CorrectPreprocess5.frag b/tests/glslparsertest/shaders/CorrectPreprocess5.frag
index 09607731b..b7b2eac20 100644
--- a/tests/glslparsertest/shaders/CorrectPreprocess5.frag
+++ b/tests/glslparsertest/shaders/CorrectPreprocess5.frag
@@ -4,7 +4,7 @@
//
// [end config]
-//mutiple line macros - test case.
+//multiple line macros - test case.
#define test 5
#define t1 1
diff --git a/tests/glslparsertest/shaders/array1.frag b/tests/glslparsertest/shaders/array1.frag
index 74240cb98..06f7bd5dc 100644
--- a/tests/glslparsertest/shaders/array1.frag
+++ b/tests/glslparsertest/shaders/array1.frag
@@ -6,5 +6,5 @@
void main()
{
- int array[2][2]; // two dimentional arrays are not allowed
+ int array[2][2]; // two dimensional arrays are not allowed
}
diff --git a/tests/glslparsertest/shaders/function3.frag b/tests/glslparsertest/shaders/function3.frag
index ff67b2a4e..46a920227 100644
--- a/tests/glslparsertest/shaders/function3.frag
+++ b/tests/glslparsertest/shaders/function3.frag
@@ -6,7 +6,7 @@
void function(const int i)
{
- i = 3; // const value cant be modified
+ i = 3; // const value can't be modified
}
void main()
diff --git a/tests/glslparsertest/shaders/preprocess1.frag b/tests/glslparsertest/shaders/preprocess1.frag
index 5802dc559..ae368fcaf 100644
--- a/tests/glslparsertest/shaders/preprocess1.frag
+++ b/tests/glslparsertest/shaders/preprocess1.frag
@@ -4,7 +4,7 @@
//
// [end config]
-// tests for macro redifinition (t2) and the #if and #else nestings.
+// tests for macro redefinition (t2) and the #if and #else nestings.
// takes care of elif also.
#define t1 (1+2)
diff --git a/tests/glslparsertest/shaders/preprocess2.frag b/tests/glslparsertest/shaders/preprocess2.frag
index bed38f441..f61779db2 100644
--- a/tests/glslparsertest/shaders/preprocess2.frag
+++ b/tests/glslparsertest/shaders/preprocess2.frag
@@ -6,7 +6,7 @@
// #line directive-- test cases.
// chks for Invalid directives, all possible #line errors
-// Also checks the correct verions of #line dorective.
+// Also checks the correct versions of #line dorective.
#define t1 1
#define t2 2
diff --git a/tests/glslparsertest/shaders/preprocess4.frag b/tests/glslparsertest/shaders/preprocess4.frag
index 6c3362602..1d89d12fb 100644
--- a/tests/glslparsertest/shaders/preprocess4.frag
+++ b/tests/glslparsertest/shaders/preprocess4.frag
@@ -50,6 +50,6 @@ int foo(int test)
#pragma bind
#pragma (on)
#pragma on (on)
-#pragma optmize(on
+#pragma optimize(on
diff --git a/tests/glslparsertest/shaders/struct7.frag b/tests/glslparsertest/shaders/struct7.frag
index 54d21957e..04176b5a9 100644
--- a/tests/glslparsertest/shaders/struct7.frag
+++ b/tests/glslparsertest/shaders/struct7.frag
@@ -7,5 +7,5 @@
void main()
{
struct s {
- } s1; // structures have to be declared with atleast one member
+ } s1; // structures have to be declared with at least one member
}
diff --git a/tests/glx/glx-multithread-shader-compile.c b/tests/glx/glx-multithread-shader-compile.c
index 7d7723da8..d9ffc7ac2 100644
--- a/tests/glx/glx-multithread-shader-compile.c
+++ b/tests/glx/glx-multithread-shader-compile.c
@@ -26,7 +26,7 @@
* @author Mathias Fröhlich
*
* Create two GLX contexts and concurrently compile shaders.
- * Exercises a race conditon with the r600 llvm compiler.
+ * Exercises a race condition with the r600 llvm compiler.
*/
#include "piglit-util-gl.h"
diff --git a/tests/hiz/hiz-util.c b/tests/hiz/hiz-util.c
index 253df9139..831ea3d5c 100644
--- a/tests/hiz/hiz-util.c
+++ b/tests/hiz/hiz-util.c
@@ -188,7 +188,7 @@ hiz_delete_fbo(GLuint fbo)
/* ------------------------------------------------------------------------ */
/**
- * \name hiz_run_depth_test utilties
+ * \name hiz_run_depth_test utilities
*
* Utilities for testing depth testing.
*
@@ -281,7 +281,7 @@ hiz_run_test_depth_test_window()
/* ------------------------------------------------------------------------ */
/**
- * \name hiz_run_depth_read utilties
+ * \name hiz_run_depth_read utilities
*
* Utilities for testing depth reads.
*
@@ -385,7 +385,7 @@ hiz_run_test_depth_read_window()
/* ------------------------------------------------------------------------ */
/**
- * \name hiz_run_stencil_test utilties
+ * \name hiz_run_stencil_test utilities
*
* Utilities for testing stencil testing.
*
@@ -492,7 +492,7 @@ hiz_run_test_stencil_test_window()
/* ------------------------------------------------------------------------ */
/**
- * \name hiz_run_stencil_read utilties
+ * \name hiz_run_stencil_read utilities
*
* Utilities for testing the reading of the stencil buffer.
*
diff --git a/tests/llvmpipe/tests/random.h b/tests/llvmpipe/tests/random.h
index dc7b57f1c..32ace790e 100644
--- a/tests/llvmpipe/tests/random.h
+++ b/tests/llvmpipe/tests/random.h
@@ -129,7 +129,7 @@ protected:
for (int y = 0; y < height; ++y) {
for (int x = 0; x < width; ++x) {
Colour& pixel = result[x + y * width];
- /* A easily identifiable pattern with x / y co-ordinates in color values
+ /* A easily identifiable pattern with x / y coordinates in color values
pixel[0] = (x % 10) / 10.0f;
pixel[1] = (y % 10) / 10.0f;
pixel[2] = (x % 10) / 10.0f + (y % 10) / 100.0f;
diff --git a/tests/llvmpipe/utils/framebuffer.h b/tests/llvmpipe/utils/framebuffer.h
index b60fa20d0..c49a963f4 100644
--- a/tests/llvmpipe/utils/framebuffer.h
+++ b/tests/llvmpipe/utils/framebuffer.h
@@ -31,7 +31,7 @@ class FrameBuffer
{
public:
FrameBuffer()
- : mWidth(0), mHeight(0), mTexture(0), mFrameBuffer(0)
+ : mWidth(0), mHeight(0), mTexture(0), mFrameBuffer(0), mChannelType(0), mClamped(false)
{
mInternalFormat = GL_RGBA;
mFormat = GL_BGRA;
diff --git a/tests/no_error.py b/tests/no_error.py
index 7799cef02..4ecaa9a01 100644
--- a/tests/no_error.py
+++ b/tests/no_error.py
@@ -15,7 +15,7 @@ profile = TestProfile()
profile.filters = _profile1.filters + _profile2.filters
# Add a modified version of each PiglitGLTest as a khr_no_error variant.
-# Shader runner doesn't explitly test for expected errors so we add shader
+# Shader runner doesn't explicitly test for expected errors so we add shader
# tests as is. We actively filter GLSL parser and any other type of tests.
for name, test in itertools.chain(_profile1.test_list.items(),
_profile2.test_list.items()):
diff --git a/tests/opengl.py b/tests/opengl.py
index ec67aa4dc..d4e9ba4de 100644
--- a/tests/opengl.py
+++ b/tests/opengl.py
@@ -2167,6 +2167,15 @@ with profile.test_list.group_manager(
'uniform namespace is per-program')
g(['arb_separate_shader_object-xfb-rendezvous_by_location'],
'Transform feedback with rendezvous by location')
+ g(['arb_separate_shader_object-xfb-explicit-location-array', 'vs'],
+ 'xfb-explicit-location-array_vs',
+ run_concurrent=False)
+ g(['arb_separate_shader_object-xfb-explicit-location-array', 'gs'],
+ 'xfb-explicit-location-array_gs',
+ run_concurrent=False)
+ g(['arb_separate_shader_object-xfb-explicit-location-array', 'gs_max'],
+ 'xfb-explicit-location-array_gs_max',
+ run_concurrent=False)
# Group ARB_sampler_objects
with profile.test_list.group_manager(
@@ -3568,7 +3577,8 @@ with profile.test_list.group_manager(
'gl_ClipDistance[5]-no-subscript',
'gl_ClipDistance[6]-no-subscript',
'gl_ClipDistance[7]-no-subscript',
- 'gl_ClipDistance[8]-no-subscript']:
+ 'gl_ClipDistance[8]-no-subscript',
+ 'gl_CullDistance']:
g(['ext_transform_feedback-builtin-varyings', varying],
'builtin-varyings {}'.format(varying), run_concurrent=False)
@@ -3924,6 +3934,11 @@ with profile.test_list.group_manager(
g(['arb_seamless_cubemap-three-faces-average'])
with profile.test_list.group_manager(
+ PiglitGLTest,
+ grouptools.join('spec', 'amd_gpu_shader_half_float')) as g:
+ g(['amd_gpu_shader_half_float-explicit-offset-bufferstorage'], 'explicit-offset-bufferstorage')
+
+with profile.test_list.group_manager(
PiglitGLTest, grouptools.join('spec', 'AMD_pinned_memory')) as g:
g(['amd_pinned_memory', 'offset=0'], 'offset=0')
g(['amd_pinned_memory', 'increment-offset'], 'increment-offset')
diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
index df5fa2a84..304073c6b 100644
--- a/tests/shaders/built-in-constants.c
+++ b/tests/shaders/built-in-constants.c
@@ -557,7 +557,7 @@ piglit_init(int argc, char **argv)
for (i = 0; i < num_tests; i++) {
bool subtest_pass = true;
- const char *comparitor =
+ const char *comparator =
parse_str(tests[i].name, "gl_Min", NULL) ? "<=" : ">=";
/* Generate the uniform declaration for the test. This will
@@ -565,7 +565,7 @@ piglit_init(int argc, char **argv)
*/
snprintf(uniform, sizeof(uniform),
uniform_template,
- tests[i].name, comparitor, tests[i].minimum);
+ tests[i].name, comparator, tests[i].minimum);
/* Try to compile the vertex shader.
*/
diff --git a/tests/shaders/fp-set-01.c b/tests/shaders/fp-set-01.c
index 84a4ce8a1..760455907 100644
--- a/tests/shaders/fp-set-01.c
+++ b/tests/shaders/fp-set-01.c
@@ -83,7 +83,7 @@ static GLint progs[2];
enum piglit_result
piglit_display(void)
{
- const GLfloat comparitor[4] = { 0.5, 0.5, 0.5, 0.5 };
+ const GLfloat comparator[4] = { 0.5, 0.5, 0.5, 0.5 };
unsigned i;
unsigned j;
enum piglit_result result = PIGLIT_PASS;
@@ -106,7 +106,7 @@ piglit_display(void)
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0,
color);
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 1,
- comparitor);
+ comparator);
piglit_draw_rect(x, 1, BOX_SIZE, BOX_SIZE);
diff --git a/tests/shaders/fp-set-02.c b/tests/shaders/fp-set-02.c
index e88cc61be..c34f3c049 100644
--- a/tests/shaders/fp-set-02.c
+++ b/tests/shaders/fp-set-02.c
@@ -157,7 +157,7 @@ tr_func(float a, float b)
enum piglit_result
piglit_display(void)
{
- const GLfloat comparitor[4] = { 0.5, 0.5, 0.5, 0.5 };
+ const GLfloat comparator[4] = { 0.5, 0.5, 0.5, 0.5 };
static const float values[3] = { 0.0, 0.5, 1.0 };
unsigned i;
unsigned j;
@@ -168,7 +168,7 @@ piglit_display(void)
glClear(GL_COLOR_BUFFER_BIT);
glEnable(GL_FRAGMENT_PROGRAM_ARB);
- glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 1, comparitor);
+ glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 1, comparator);
for (i = 0; i < (2 * ARRAY_SIZE(progs)); i++) {
const int y = (i * (BOX_SIZE + 1)) + 1;
@@ -194,13 +194,13 @@ piglit_display(void)
ref[2] = values[(j / 9) % 3];
ref[3] = values[(j / 27) % 3];
- color[0] = tests[idx].func(comparitor[0], ref[0])
+ color[0] = tests[idx].func(comparator[0], ref[0])
? 1.0 : 0.0;
- color[1] = tests[idx].func(comparitor[1], ref[1])
+ color[1] = tests[idx].func(comparator[1], ref[1])
? 1.0 : 0.0;
- color[2] = tests[idx].func(comparitor[2], ref[2])
+ color[2] = tests[idx].func(comparator[2], ref[2])
? 1.0 : 0.0;
- color[3] = tests[idx].func(comparitor[3], ref[3])
+ color[3] = tests[idx].func(comparator[3], ref[3])
? 1.0 : 0.0;
glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB,
diff --git a/tests/shaders/getuniform-03.c b/tests/shaders/getuniform-03.c
index 9de9993bf..6509781f3 100755
--- a/tests/shaders/getuniform-03.c
+++ b/tests/shaders/getuniform-03.c
@@ -230,7 +230,7 @@ piglit_init(int argc, char **argv)
}
/* check the types of the active uniforms and check which ones got
- * references by glGetActiveUniform for later comparaison. */
+ * references by glGetActiveUniform for later comparison. */
for (i = 0; i < numUniforms; i++) {
struct builtin_uniform_t *uniform;
GLcharARB name[100];
diff --git a/tests/shaders/glsl-light-model.c b/tests/shaders/glsl-light-model.c
index 63b5ce4b1..e85d3ee76 100644
--- a/tests/shaders/glsl-light-model.c
+++ b/tests/shaders/glsl-light-model.c
@@ -27,7 +27,7 @@
*
* Each of the 3 shaders involved in this test have a global variable called
* \c global_variable. Two of the shaders have (differing) initializers for
- * this variable, and the other lacks an initalizer. The test verifies that
+ * this variable, and the other lacks an initializer. The test verifies that
* linking the 3 shaders together results in an error due to the conflicting
* initializer.
*
diff --git a/tests/shaders/glsl-link-initializer-03.c b/tests/shaders/glsl-link-initializer-03.c
index 05edafea9..7efeee90c 100644
--- a/tests/shaders/glsl-link-initializer-03.c
+++ b/tests/shaders/glsl-link-initializer-03.c
@@ -27,7 +27,7 @@
*
* Each of the 3 shaders involved in this test have a global variable called
* \c global_variable. Two of the shaders have (differing) initializers for
- * this variable, and the other lacks an initalizer. The test verifies that
+ * this variable, and the other lacks an initializer. The test verifies that
* the shader lacking an initializer can successfully be linked with each of
* the shaders that have initalizers.
*
diff --git a/tests/shaders/parser_utils.h b/tests/shaders/parser_utils.h
index 0768b2752..30db0b3a8 100644
--- a/tests/shaders/parser_utils.h
+++ b/tests/shaders/parser_utils.h
@@ -40,7 +40,7 @@
*
* If the input cannot be parsed as a "foo" object, the boolean return
* value will evaluate to false and the input string will be returned
- * as output string as-is (which mimicks the behavior of the C
+ * as output string as-is (which mimics the behavior of the C
* standard library strto* functions). The "foo" output argument will
* be left in an undefined state in that case.
*/
@@ -157,7 +157,7 @@ parse_word(const char *s, const char **t, const char **rest);
* buffer pointed to by \p t and null-terminated.
*
* The parse is considered to fail if the size of the result
- * (including the terminating null character) would have exceded the
+ * (including the terminating null character) would have exceeded the
* number of characters allocated for it in the buffer as given by the
* \p n argument.
*/
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 7a9640beb..b8191231e 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -727,7 +727,7 @@ program_binary_save_restore(bool script_command)
free(binary);
if (!piglit_check_gl_error(GL_NO_ERROR)) {
fprintf(stderr, "glProgramBinary error "
- "(should not happend according to spec.)\n");
+ "(should not happen according to spec.)\n");
piglit_report_result(PIGLIT_FAIL);
}
diff --git a/tests/shaders/ssa/fs-while-loop-rotate-value.shader_test b/tests/shaders/ssa/fs-while-loop-rotate-value.shader_test
index e2893b679..337f578a1 100644
--- a/tests/shaders/ssa/fs-while-loop-rotate-value.shader_test
+++ b/tests/shaders/ssa/fs-while-loop-rotate-value.shader_test
@@ -1,6 +1,6 @@
# test to check a bug in r600 sb backend
# it miscompiles this due to the 1.0
-# at the end wierdly.
+# at the end weirdly.
[require]
GLSL >= 1.10
diff --git a/tests/shaders/useshaderprogram-flushverts-1.c b/tests/shaders/useshaderprogram-flushverts-1.c
index e1593d75e..9c5e812ad 100644
--- a/tests/shaders/useshaderprogram-flushverts-1.c
+++ b/tests/shaders/useshaderprogram-flushverts-1.c
@@ -27,7 +27,7 @@
/** @file useshaderprogram-flushverts-1.c
*
- * Tests that a change in the shader progarm results in previous
+ * Tests that a change in the shader program results in previous
* vertices getting flushed correctly with the previous shader.
*/
diff --git a/tests/shaders/vp-bad-program.c b/tests/shaders/vp-bad-program.c
index 784ff45b0..433cc2b1d 100644
--- a/tests/shaders/vp-bad-program.c
+++ b/tests/shaders/vp-bad-program.c
@@ -79,7 +79,7 @@ piglit_display(void)
}
/* Check that we correctly produce GL_INVALID_OPERATION when rendering
- * with an invalid/non-existant program.
+ * with an invalid/non-existent program.
*/
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, 99);
glEnable(GL_VERTEX_PROGRAM_ARB);
@@ -104,7 +104,7 @@ piglit_display(void)
}
/* Check that we correctly produce GL_INVALID_OPERATION when doing
- * glDrawArrays with an invalid/non-existant program.
+ * glDrawArrays with an invalid/non-existent program.
*/
glVertexPointer(3, GL_FLOAT, 0, vertcoords);
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index 035f43f74..ea56aa516 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -1,6 +1,7 @@
add_subdirectory (amd_compressed_atc_texture)
add_subdirectory (amd_framebuffer_multisample_advanced)
add_subdirectory (amd_depth_clamp_separate)
+add_subdirectory (amd_gpu_shader_half_float)
add_subdirectory (amd_performance_monitor)
add_subdirectory (amd_pinned_memory)
add_subdirectory (arb_arrays_of_arrays)
diff --git a/tests/spec/amd_gpu_shader_half_float/CMakeLists.gl.txt b/tests/spec/amd_gpu_shader_half_float/CMakeLists.gl.txt
new file mode 100644
index 000000000..0301f4de1
--- /dev/null
+++ b/tests/spec/amd_gpu_shader_half_float/CMakeLists.gl.txt
@@ -0,0 +1,14 @@
+include_directories(
+ ${GLEXT_INCLUDE_DIR}
+ ${OPENGL_INCLUDE_PATH}
+ ${piglit_SOURCE_DIR}/tests/util
+)
+
+link_libraries (
+ piglitutil_${piglit_target_api}
+ ${OPENGL_gl_LIBRARY}
+)
+
+piglit_add_executable (amd_gpu_shader_half_float-explicit-offset-bufferstorage half-float-explicit-offset-bufferstorage.c half_float_util.c)
+
+# vim: ft=cmake:
diff --git a/tests/spec/amd_gpu_shader_half_float/CMakeLists.txt b/tests/spec/amd_gpu_shader_half_float/CMakeLists.txt
new file mode 100644
index 000000000..144a306f4
--- /dev/null
+++ b/tests/spec/amd_gpu_shader_half_float/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/amd_gpu_shader_half_float/half-float-explicit-offset-bufferstorage.c b/tests/spec/amd_gpu_shader_half_float/half-float-explicit-offset-bufferstorage.c
new file mode 100644
index 000000000..3b8aedcc1
--- /dev/null
+++ b/tests/spec/amd_gpu_shader_half_float/half-float-explicit-offset-bufferstorage.c
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2014 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file half-float-explicit-offset-bufferstorage.c
+ *
+ * This is a copy of the arb_uniform_buffer_object bufferstorage test updated
+ * to make use of explicit offsets and half floats.
+ *
+ * Test rendering with UBOs. We draw four squares with different
+ * positions, sizes, rotations and colors where those parameters come
+ * from UBOs. Same as rendering.c, except that the UBOs are
+ * persistently mapped.
+ */
+
+#include "piglit-util-gl.h"
+
+#include "half_float_util.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_core_version = 40;
+ config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+static const char vert_shader_text[] =
+ "#version 400\n"
+ "#extension GL_ARB_enhanced_layouts : require\n"
+ "#extension GL_AMD_gpu_shader_half_float : require\n"
+ "\n"
+ "in vec4 piglit_vertex;\n"
+ "\n"
+ "layout(std140) uniform;\n"
+ "layout(std140) uniform ub_pos_size {\n"
+ " layout(offset = 0) float16_t size;\n"
+ " layout(offset = 2) float16_t pos1;\n"
+ " layout(offset = 6) float16_t pos2;\n"
+ "};\n"
+ "uniform ub_rot {float rotation; };\n"
+ "\n"
+ "void main()\n"
+ "{\n"
+ " mat2 m;\n"
+ " m[0][0] = m[1][1] = cos(rotation); \n"
+ " m[0][1] = sin(rotation); \n"
+ " m[1][0] = -m[0][1]; \n"
+ " gl_Position.xy = m * piglit_vertex.xy * vec2(size) + vec2(pos1, pos2);\n"
+ " gl_Position.zw = vec2(0, 1);\n"
+ "}\n";
+
+static const char frag_shader_text[] =
+ "#version 400\n"
+ "#extension GL_ARB_enhanced_layouts : require\n"
+ "#extension GL_AMD_gpu_shader_half_float : require\n"
+ "\n"
+ "layout(std140) uniform;\n"
+ "layout(std140) uniform ub_color {\n"
+ " layout(offset = 0) vec4 color;\n"
+ " layout(offset = 22) float16_t color_scale;\n"
+ "} named_ub;\n"
+ "\n"
+ "void main()\n"
+ "{\n"
+ " gl_FragColor = named_ub.color * float(named_ub.color_scale);\n"
+ "}\n";
+
+#define NUM_SQUARES 4
+#define NUM_UBOS 3
+
+/* Square positions and sizes */
+static const float pos_size[NUM_SQUARES][3] = {
+ { 0.1, -0.5, -0.5 },
+ { 0.2, 0.5, -0.5 },
+ { 0.3, -0.5, 0.5 },
+ { 0.4, 0.5, 0.5 }
+};
+
+/* Square color and color_scales */
+static const float color[NUM_SQUARES][4] = {
+ { 2.0, 0.0, 0.0, 1.0 },
+ { 0.0, 4.0, 0.0, 1.0 },
+ { 0.0, 0.0, 5.0, 1.0 },
+ { 0.2, 0.2, 0.2, 0.2 }
+};
+
+static const float color_scale[NUM_SQUARES] = {
+ 0.50,
+ 0.25,
+ 0.20,
+ 5.00
+};
+
+/* Square rotations */
+static const float rotation[NUM_SQUARES] = {
+ 0.0,
+ 0.1,
+ 0.2,
+ 0.3
+};
+
+static GLuint prog;
+static GLuint buffers[NUM_UBOS];
+static void *ubos[NUM_UBOS];
+
+static void
+setup_ubos(void)
+{
+ static const char *names[NUM_UBOS] = {
+ "ub_pos_size",
+ "ub_color",
+ "ub_rot"
+ };
+ int i;
+
+ glGenBuffers(NUM_UBOS, buffers);
+
+ for (i = 0; i < NUM_UBOS; i++) {
+ GLint index, size;
+
+ /* query UBO index */
+ index = glGetUniformBlockIndex(prog, names[i]);
+
+ /* query UBO size */
+ glGetActiveUniformBlockiv(prog, index,
+ GL_UNIFORM_BLOCK_DATA_SIZE, &size);
+
+ printf("UBO %s: index = %d, size = %d\n",
+ names[i], index, size);
+
+ /* Allocate UBO */
+ glBindBuffer(GL_UNIFORM_BUFFER, buffers[i]);
+ glBufferStorage(GL_UNIFORM_BUFFER, size, NULL,
+ GL_MAP_WRITE_BIT |
+ GL_MAP_PERSISTENT_BIT |
+ GL_MAP_COHERENT_BIT |
+ GL_DYNAMIC_STORAGE_BIT);
+
+ piglit_check_gl_error(GL_NO_ERROR);
+
+ ubos[i] = glMapBufferRange(GL_UNIFORM_BUFFER, 0, size,
+ GL_MAP_WRITE_BIT |
+ GL_MAP_PERSISTENT_BIT |
+ GL_MAP_COHERENT_BIT);
+
+ piglit_check_gl_error(GL_NO_ERROR);
+
+ if (!ubos[i])
+ piglit_report_result(PIGLIT_FAIL);
+
+ /* Attach UBO */
+ glBindBufferBase(GL_UNIFORM_BUFFER, i, buffers[i]);
+ glUniformBlockBinding(prog, index, i);
+
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+ }
+}
+
+void
+piglit_init(int argc, char **argv)
+{
+ piglit_require_extension("GL_ARB_enhanced_layouts");
+ piglit_require_extension("GL_AMD_gpu_shader_half_float");
+
+ prog = piglit_build_simple_program(vert_shader_text, frag_shader_text);
+ assert(prog);
+ glUseProgram(prog);
+
+ setup_ubos();
+
+ glClearColor(0.2, 0.2, 0.2, 0.2);
+}
+
+static bool
+probe(int x, int y, int color_index)
+{
+ float expected[4];
+
+ /* mul color by color_scale */
+ expected[0] = color[color_index][0] * color_scale[color_index];
+ expected[1] = color[color_index][1] * color_scale[color_index];
+ expected[2] = color[color_index][2] * color_scale[color_index];
+ expected[3] = color[color_index][3] * color_scale[color_index];
+
+ return piglit_probe_pixel_rgba(x, y, expected);
+}
+
+
+enum piglit_result
+piglit_display(void)
+{
+ GLsync fence;
+ bool pass = true;
+ int x0 = piglit_width / 4;
+ int x1 = piglit_width * 3 / 4;
+ int y0 = piglit_height / 4;
+ int y1 = piglit_height * 3 / 4;
+ int i;
+
+ glViewport(0, 0, piglit_width, piglit_height);
+
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ for (i = 0; i < NUM_SQUARES; i++) {
+ /* Wait for any previous rendering to finish before
+ * updating the UBOs
+ */
+ fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+ glClientWaitSync(fence, GL_SYNC_FLUSH_COMMANDS_BIT,
+ GL_TIMEOUT_IGNORED);
+
+ /* Load UBO data */
+ uint16_t half_float_val = _mesa_float_to_half_slow(pos_size[i][0]);
+ memcpy(ubos[0], &half_float_val, 2);
+
+ half_float_val = _mesa_float_to_half_slow(pos_size[i][1]);
+ memcpy((uint8_t *)ubos[0] + 2, &half_float_val, 2);
+
+ half_float_val = _mesa_float_to_half_slow(pos_size[i][2]);
+ memcpy((uint8_t *)ubos[0] + 6, &half_float_val, 2);
+
+ memcpy(ubos[1], color[i], sizeof(color[0]));
+
+ half_float_val = _mesa_float_to_half_slow(color_scale[i]);
+ memcpy(((uint8_t *)ubos[1]) + 22, &half_float_val, 2);
+
+ memcpy(ubos[2], &rotation[i], sizeof(rotation[0]));
+
+ piglit_draw_rect(-1, -1, 2, 2);
+ }
+
+ pass = probe(x0, y0, 0) && pass;
+ pass = probe(x1, y0, 1) && pass;
+ pass = probe(x0, y1, 2) && pass;
+ pass = probe(x1, y1, 3) && pass;
+
+ piglit_present_results();
+
+ return pass ? PIGLIT_PASS : PIGLIT_FAIL;
+}
diff --git a/tests/spec/amd_gpu_shader_half_float/half_float_util.c b/tests/spec/amd_gpu_shader_half_float/half_float_util.c
new file mode 100644
index 000000000..a4b5ffd8a
--- /dev/null
+++ b/tests/spec/amd_gpu_shader_half_float/half_float_util.c
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ * Copyright 2015 Philip Taylor <philip@zaynar.co.uk>
+ * Copyright 2018 Advanced Micro Devices, Inc.
+ * Copyright (C) 2018-2019 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+ /* These functions were copied from Mesas util library. The only difference
+ * is the custom optimised _mesa_roundevenf() calls were replaced with
+ * lrintf()
+ */
+
+#include <assert.h>
+#include <math.h>
+#include <stdint.h>
+
+#include "half_float_util.h"
+
+typedef union { float f; int32_t i; uint32_t u; } fi_type;
+
+/**
+ * Convert a 4-byte float to a 2-byte half float.
+ *
+ * Not all float32 values can be represented exactly as a float16 value. We
+ * round such intermediate float32 values to the nearest float16. When the
+ * float32 lies exactly between to float16 values, we round to the one with
+ * an even mantissa.
+ *
+ * This rounding behavior has several benefits:
+ * - It has no sign bias.
+ *
+ * - It reproduces the behavior of real hardware: opcode F32TO16 in Intel's
+ * GPU ISA.
+ *
+ * - By reproducing the behavior of the GPU (at least on Intel hardware),
+ * compile-time evaluation of constant packHalf2x16 GLSL expressions will
+ * result in the same value as if the expression were executed on the GPU.
+ */
+uint16_t
+_mesa_float_to_half_slow(float val)
+{
+ const fi_type fi = {val};
+ const int flt_m = fi.i & 0x7fffff;
+ const int flt_e = (fi.i >> 23) & 0xff;
+ const int flt_s = (fi.i >> 31) & 0x1;
+ int s, e, m = 0;
+ uint16_t result;
+
+ /* sign bit */
+ s = flt_s;
+
+ /* handle special cases */
+ if ((flt_e == 0) && (flt_m == 0)) {
+ /* zero */
+ /* m = 0; - already set */
+ e = 0;
+ }
+ else if ((flt_e == 0) && (flt_m != 0)) {
+ /* denorm -- denorm float maps to 0 half */
+ /* m = 0; - already set */
+ e = 0;
+ }
+ else if ((flt_e == 0xff) && (flt_m == 0)) {
+ /* infinity */
+ /* m = 0; - already set */
+ e = 31;
+ }
+ else if ((flt_e == 0xff) && (flt_m != 0)) {
+ /* Retain the top bits of a NaN to make sure that the quiet/signaling
+ * status stays the same.
+ */
+ m = flt_m >> 13;
+ if (!m)
+ m = 1;
+ e = 31;
+ }
+ else {
+ /* regular number */
+ const int new_exp = flt_e - 127;
+ if (new_exp < -14) {
+ /* The float32 lies in the range (0.0, min_normal16) and is rounded
+ * to a nearby float16 value. The result will be either zero, subnormal,
+ * or normal.
+ */
+ e = 0;
+ m = lrintf((1 << 24) * fabsf(fi.f));
+ }
+ else if (new_exp > 15) {
+ /* map this value to infinity */
+ /* m = 0; - already set */
+ e = 31;
+ }
+ else {
+ /* The float32 lies in the range
+ * [min_normal16, max_normal16 + max_step16)
+ * and is rounded to a nearby float16 value. The result will be
+ * either normal or infinite.
+ */
+ e = new_exp + 15;
+ m = lrintf(flt_m / (float) (1 << 13));
+ }
+ }
+
+ assert(0 <= m && m <= 1024);
+ if (m == 1024) {
+ /* The float32 was rounded upwards into the range of the next exponent,
+ * so bump the exponent. This correctly handles the case where f32
+ * should be rounded up to float16 infinity.
+ */
+ ++e;
+ m = 0;
+ }
+
+ result = (s << 15) | (e << 10) | m;
+ return result;
+}
+
+/**
+ * Convert a 2-byte half float to a 4-byte float.
+ * Based on code from:
+ * http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/008786.html
+ */
+float
+_mesa_half_to_float_slow(uint16_t val)
+{
+ fi_type infnan;
+ fi_type magic;
+ fi_type f32;
+
+ infnan.u = 0x8f << 23;
+ infnan.f = 65536.0f;
+ magic.u = 0xef << 23;
+
+ /* Exponent / Mantissa */
+ f32.u = (val & 0x7fff) << 13;
+
+ /* Adjust */
+ f32.f *= magic.f;
+ /* XXX: The magic mul relies on denorms being available */
+
+ /* Inf / NaN */
+ if (f32.f >= infnan.f)
+ f32.u |= 0xff << 23;
+
+ /* Sign */
+ f32.u |= (uint32_t)(val & 0x8000) << 16;
+
+ return f32.f;
+} \ No newline at end of file
diff --git a/tests/spec/amd_gpu_shader_half_float/half_float_util.h b/tests/spec/amd_gpu_shader_half_float/half_float_util.h
new file mode 100644
index 000000000..f0f50fd22
--- /dev/null
+++ b/tests/spec/amd_gpu_shader_half_float/half_float_util.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright © 2015 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef _HALF_FLOAT_H_
+#define _HALF_FLOAT_H_
+
+#define FP16_ONE ((uint16_t) 0x3c00)
+#define FP16_ZERO ((uint16_t) 0)
+
+uint16_t _mesa_float_to_half_slow(float val);
+float _mesa_half_to_float_slow(uint16_t val);
+
+#endif /* _HALF_FLOAT_H_ */
diff --git a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
index 39dc268df..27e85fd3b 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
@@ -1,4 +1,4 @@
-# Simple test of accessing an atomic counter with dynamic indicies.
+# Simple test of accessing an atomic counter with dynamic indexes.
#
[require]
@@ -26,7 +26,7 @@ void main()
uint v0[12];
uint v1[12];
- /* Get all initail values of a0 */
+ /* Get all initial values of a0 */
v0[0] = atomicCounter(a0[0][0]);
v0[1] = atomicCounter(a0[0][1]);
v0[2] = atomicCounter(a0[0][2]);
diff --git a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
index 9949df843..dd2c3b734 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
@@ -25,7 +25,7 @@ void main()
uint v0[12];
uint v1[12];
- /* Get all initail values of a0 */
+ /* Get all initial values of a0 */
v0[0] = atomicCounter(a0[0][0]);
v0[1] = atomicCounter(a0[0][1]);
v0[2] = atomicCounter(a0[0][2]);
@@ -59,7 +59,7 @@ void main()
atomicCounterDecrement(a1[0][1][1]);
atomicCounterDecrement(a1[2][0][1]);
- /* Get all initail values of a1 */
+ /* Get all initial values of a1 */
v0[0] = atomicCounter(a1[0][0][0]);
v0[1] = atomicCounter(a1[0][0][1]);
v0[2] = atomicCounter(a1[0][1][0]);
diff --git a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-indirect-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-indirect-index.shader_test
index d58b07691..f6d72751e 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-indirect-index.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-indirect-index.shader_test
@@ -1,4 +1,4 @@
-# Simple test of accessing an atomic counter with dynamic indicies.
+# Simple test of accessing an atomic counter with dynamic indices.
#
[require]
@@ -26,7 +26,7 @@ void main()
uint v0[12];
uint v1[12];
- /* Get all initail values of a0 */
+ /* Get all initial values of a0 */
v0[0] = atomicCounter(a0[0][0]);
v0[1] = atomicCounter(a0[0][1]);
v0[2] = atomicCounter(a0[0][2]);
diff --git a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
index c5c3015dc..fd9344394 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
@@ -25,7 +25,7 @@ void main()
uint v0[12];
uint v1[12];
- /* Get all initail values of a0 */
+ /* Get all initial values of a0 */
v0[0] = atomicCounter(a0[0][0]);
v0[1] = atomicCounter(a0[0][1]);
v0[2] = atomicCounter(a0[0][2]);
@@ -59,7 +59,7 @@ void main()
atomicCounterDecrement(a1[0][1][1]);
atomicCounterDecrement(a1[2][0][1]);
- /* Get all initail values of a1 */
+ /* Get all initial values of a1 */
v0[0] = atomicCounter(a1[0][0][0]);
v0[1] = atomicCounter(a1[0][0][1]);
v0[2] = atomicCounter(a1[0][1][0]);
diff --git a/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test b/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test
index dbc9c40e4..8eae15c5b 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test
@@ -1,5 +1,5 @@
# This test verifies that dynamically uniform indexing of sampler arrays
-# in the vertex shader behaves correctly, and the offests for the
+# in the vertex shader behaves correctly, and the offsets for the
# non-opaque members are calculated correctly.
[require]
diff --git a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field-unsized2.shader_test b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field-unsized2.shader_test
index 269690462..da8ed8661 100644
--- a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field-unsized2.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-interface-field-unsized2.shader_test
@@ -4,7 +4,7 @@
#
# Note: The size of the arrays also means this tests the
# max boundary of GL_MAX_VERTEX_ATTRIBS when it's set
-# to 64 (the mininum allowed for an implementation).
+# to 64 (the minimum allowed for an implementation).
[require]
GLSL >= 1.50
diff --git a/tests/spec/arb_arrays_of_arrays/max-binding.c b/tests/spec/arb_arrays_of_arrays/max-binding.c
index 9d9bd2d47..063b87932 100644
--- a/tests/spec/arb_arrays_of_arrays/max-binding.c
+++ b/tests/spec/arb_arrays_of_arrays/max-binding.c
@@ -23,7 +23,7 @@
/** @file max-binding.c
*
- * Test that using more than the maximum number of suported interface block,
+ * Test that using more than the maximum number of supported interface block,
* sampler, or atomic bindings fails with a compile error.
*/
diff --git a/tests/spec/arb_bindless_texture/errors.c b/tests/spec/arb_bindless_texture/errors.c
index fa66c9f2c..eaeab6b9b 100644
--- a/tests/spec/arb_bindless_texture/errors.c
+++ b/tests/spec/arb_bindless_texture/errors.c
@@ -299,7 +299,7 @@ check_MakeImageHandleResident_invalid_enum(void *data)
* <access> specifies whether the texture bound to the image handle
* will be treated as READ_ONLY, WRITE_ONLY, or READ_WRITE."
*
- * NOTE: The spec doesn't explicitely say that INVALID_ENUM should
+ * NOTE: The spec doesn't explicitly say that INVALID_ENUM should
* be returned, but I think it makes sense (like NVIDIA).
*/
tex = piglit_rgbw_texture(GL_RGBA32F, 16, 16, GL_FALSE, GL_FALSE,
diff --git a/tests/spec/arb_blend_func_extended/api/error-at-begin.c b/tests/spec/arb_blend_func_extended/api/error-at-begin.c
index 7acf33396..9627068a2 100644
--- a/tests/spec/arb_blend_func_extended/api/error-at-begin.c
+++ b/tests/spec/arb_blend_func_extended/api/error-at-begin.c
@@ -30,7 +30,7 @@
* implicitly calls Begin if any draw buffer has a blend function requiring the
* second color input (SRC1_COLOR, ONE_MINUS_SRC1_COLOR, SRC1_ALPHA or
* ONE_MINUS_SRC1_ALPHA), and a framebuffer is bound that has more than
- * the value of MAX_DUAL_SOURCE_DRAW_BUFFERS-1 active color attachements."
+ * the value of MAX_DUAL_SOURCE_DRAW_BUFFERS-1 active color attachments."
*/
#include "piglit-util-gl.h"
diff --git a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c
index 94c779175..770707431 100644
--- a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c
+++ b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c
@@ -30,7 +30,7 @@
* to map correct colors for each pixel group (for example by using the color
* for the first group as the color for the second group or viceversa). However,
* tests that render using solid colors across the entire polygon won't catch
- * these cases (since in that case the color is the same for boths groups of
+ * these cases (since in that case the color is the same for both groups of
* pixels).
*
* This test blends using a checker board pattern where each cell is
diff --git a/tests/spec/arb_clear_texture/integer.c b/tests/spec/arb_clear_texture/integer.c
index 03ea16ef6..1e2632e66 100644
--- a/tests/spec/arb_clear_texture/integer.c
+++ b/tests/spec/arb_clear_texture/integer.c
@@ -28,7 +28,7 @@
* texture where the first four texels are cleared to known values
* using separate calls to glClearTexSubImage. The values are chosen
* to potentially trigger problems with signed conversions. The rest
- * of the texture is initalised to zeroes. The textures are then read
+ * of the texture is initialised to zeroes. The textures are then read
* back with glGetTexImage and compared with the expected values.
*/
diff --git a/tests/spec/arb_clip_control/clip-control-depth-precision.c b/tests/spec/arb_clip_control/clip-control-depth-precision.c
index 61282a0ad..1a5433e8e 100644
--- a/tests/spec/arb_clip_control/clip-control-depth-precision.c
+++ b/tests/spec/arb_clip_control/clip-control-depth-precision.c
@@ -40,7 +40,7 @@
* This extension avoids adding a constant number even in an intermediate
* step which would destroy the effective depth precision possible with
* the floating point depth buffers.
- * Roughtly in numbers:
+ * Roughly in numbers:
* Two fragments at 5000001 and 5000000 \about 5000001*(1 - eps) distance
* from the eye point should yield to different values in the depth buffer.
* The same goes for about any fragment distance x that you should be able
diff --git a/tests/spec/arb_clip_control/clip-control.c b/tests/spec/arb_clip_control/clip-control.c
index 020ea0aa2..5a9466a73 100644
--- a/tests/spec/arb_clip_control/clip-control.c
+++ b/tests/spec/arb_clip_control/clip-control.c
@@ -225,7 +225,7 @@ draw_test(void)
pass = piglit_probe_pixel_depth(5, 5, 1.0) && pass;
- /* Defaut depth rage all clip control combinations */
+ /* Default depth rage all clip control combinations */
pass = test_patches(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE,
near, far, 10) && pass;
pass = test_patches(GL_LOWER_LEFT, GL_ZERO_TO_ONE,
diff --git a/tests/spec/arb_compute_shader/compute-and-render-bug-109630.c b/tests/spec/arb_compute_shader/compute-and-render-bug-109630.c
index e6ae51570..de3914fb9 100644
--- a/tests/spec/arb_compute_shader/compute-and-render-bug-109630.c
+++ b/tests/spec/arb_compute_shader/compute-and-render-bug-109630.c
@@ -27,7 +27,7 @@
* Test verifies that after compute workload geometry renders fine.
* This exercises hardware issue in Intel's GEN9 GPU which resulted
* in geometry flickering see https://bugs.freedesktop.org/show_bug.cgi?id=109630
- * There is no guarantied way to reproduce the issue but to run the
+ * There is no guaranteed way to reproduce the issue but to run the
* core part of the test many times.
*
* \author Andrii Kryvytskyi <andrii.o.kryvytskyi@globallogic.com>
@@ -157,7 +157,7 @@ piglit_display(void) {
glFinish();
if (!piglit_probe_pixel_rgba(0, 0, expected)) {
- printf("Failed on interation #%d \n", i);
+ printf("Failed on iteration #%d \n", i);
pass = false;
break;
}
diff --git a/tests/spec/arb_copy_image/api_errors.c b/tests/spec/arb_copy_image/api_errors.c
index 75cd27439..b144d60c1 100644
--- a/tests/spec/arb_copy_image/api_errors.c
+++ b/tests/spec/arb_copy_image/api_errors.c
@@ -241,7 +241,7 @@ test_compressed_alignment_errors()
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_NEAREST_MIPMAP_NEAREST);
- /* Check for alignment constaints */
+ /* Check for alignment constraints */
/* bad width = 21 */
glCopyImageSubData(tex[0], GL_TEXTURE_2D, 0, 0, 0, 0,
tex[1], GL_TEXTURE_2D, 0, 0, 0, 0, 21, 24, 1);
diff --git a/tests/spec/arb_copy_image/formats.c b/tests/spec/arb_copy_image/formats.c
index 95bbd04d7..6de6e7780 100644
--- a/tests/spec/arb_copy_image/formats.c
+++ b/tests/spec/arb_copy_image/formats.c
@@ -327,7 +327,7 @@ piglit_init(int argc, char **argv)
if (src_format_arg) {
/* Since we know the source format, we know the number of
- * bits per texel, so we can restrict the ammount of random
+ * bits per texel, so we can restrict the amount of random
* data we generate.
*/
Bpp = src_format_arg->bytes;
@@ -455,7 +455,7 @@ setup_test_data(const struct texture_format *src_format,
for (j = 0; j < samples; ++j) {
src_image = src_data + (j * image_size);
res_image = res_data + (j * image_size);
- /* Copy the center TEX_SIZE/2 x TEX_SIZE/2 pixels froms
+ /* Copy the center TEX_SIZE/2 x TEX_SIZE/2 pixels forms
* src_data to res_data
*/
memcpy_rect(src_image, stride, TEX_SIZE/4, TEX_SIZE/4,
@@ -563,7 +563,7 @@ load_compare_program(const struct texture_format *format)
} else if (compare == &icomp) {
gtype = "i";
} else {
- assert(!"Invalid comparison fucntion");
+ assert(!"Invalid comparison function");
gtype = "";
}
diff --git a/tests/spec/arb_cull_distance/fs-cull-and-clip-distance-different.shader_test b/tests/spec/arb_cull_distance/fs-cull-and-clip-distance-different.shader_test
index 27fff6ff3..5daf68557 100644
--- a/tests/spec/arb_cull_distance/fs-cull-and-clip-distance-different.shader_test
+++ b/tests/spec/arb_cull_distance/fs-cull-and-clip-distance-different.shader_test
@@ -5,7 +5,7 @@
# stage, as described in section 13.5.
#
# This test checks that the arrays gl_ClipDistance and gl_CullDistance only
-# interfer by gl_MaxCombinedClipAndCullDistances and not by its entrys.
+# interfer by gl_MaxCombinedClipAndCullDistances and not by its entries.
[require]
GLSL >= 1.30
diff --git a/tests/spec/arb_direct_state_access/compressedtextureimage.c b/tests/spec/arb_direct_state_access/compressedtextureimage.c
index 7b93fda8f..872340c4a 100644
--- a/tests/spec/arb_direct_state_access/compressedtextureimage.c
+++ b/tests/spec/arb_direct_state_access/compressedtextureimage.c
@@ -121,7 +121,7 @@ display_mipmaps(int x, int y)
glEnable(GL_TEXTURE_2D);
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
piglit_draw_rect_tex(x, y, i, i,
0, 0, 1, 1);
diff --git a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
index 4206a4714..a28d9f83a 100644
--- a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
+++ b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
@@ -223,7 +223,7 @@ getTexImage(bool doPBO, GLenum target, GLubyte *data,
*/
if (target == GL_TEXTURE_CUBE_MAP)
comp_size *= num_faces;
- printf("\tThe size of the texture in bytes is %d.\n", comp_size);
+ printf("\the size of the texture in bytes is %d.\n", comp_size);
/* Show the uncompressed data. */
show_image(data, num_layers * num_faces, "Data Before Compression");
diff --git a/tests/spec/arb_direct_state_access/gettextureimage-targets.c b/tests/spec/arb_direct_state_access/gettextureimage-targets.c
index 4ebb73f59..05ffc7609 100644
--- a/tests/spec/arb_direct_state_access/gettextureimage-targets.c
+++ b/tests/spec/arb_direct_state_access/gettextureimage-targets.c
@@ -58,7 +58,7 @@ init_layer_data(GLubyte *layer_data, int num_layers)
int b = (z + 1) * 255 / (num_layers - 1);
int a = x ^ y ^ z;
- /* each 4x4 block constains only one color (for S3TC) */
+ /* each 4x4 block contains only one color (for S3TC) */
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
data[((y + j) * IMAGE_WIDTH + x
diff --git a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-10.frag b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-10.frag
index ba7ca4e7f..3cfe18859 100644
--- a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-10.frag
+++ b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-10.frag
@@ -20,7 +20,7 @@
// * if more than one varying out variable is bound to the same
// number and index; or
//
-// * if the explicit binding assigments do not leave enough space
+// * if the explicit binding assignments do not leave enough space
// for the linker to automatically assign a location for a varying
// out array, which requires multiple contiguous locations."
diff --git a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-11.frag b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-11.frag
index e9a1f3878..3e6238c35 100644
--- a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-11.frag
+++ b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-11.frag
@@ -20,7 +20,7 @@
// * if more than one varying out variable is bound to the same
// number and index; or
//
-// * if the explicit binding assigments do not leave enough space
+// * if the explicit binding assignments do not leave enough space
// for the linker to automatically assign a location for a varying
// out array, which requires multiple contiguous locations."
//
diff --git a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag
index 413778a3d..9f1799347 100644
--- a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag
+++ b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag
@@ -20,7 +20,7 @@
// * if more than one varying out variable is bound to the same
// number and index; or
//
-// * if the explicit binding assigments do not leave enough space
+// * if the explicit binding assignments do not leave enough space
// for the linker to automatically assign a location for a varying
// out array, which requires multiple contiguous locations."
diff --git a/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-10.frag b/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-10.frag
index 610976b13..6231e303b 100644
--- a/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-10.frag
+++ b/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-10.frag
@@ -20,7 +20,7 @@
// * if more than one varying out variable is bound to the same
// number and index; or
//
-// * if the explicit binding assigments do not leave enough space
+// * if the explicit binding assignments do not leave enough space
// for the linker to automatically assign a location for a varying
// out array, which requires multiple contiguous locations."
diff --git a/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-11.frag b/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-11.frag
index 1720d6635..342b01fa2 100644
--- a/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-11.frag
+++ b/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-11.frag
@@ -20,7 +20,7 @@
// * if more than one varying out variable is bound to the same
// number and index; or
//
-// * if the explicit binding assigments do not leave enough space
+// * if the explicit binding assignments do not leave enough space
// for the linker to automatically assign a location for a varying
// out array, which requires multiple contiguous locations."
//
diff --git a/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-13.frag b/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-13.frag
index c6e6d049a..8a4c55a19 100644
--- a/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-13.frag
+++ b/tests/spec/arb_explicit_attrib_location/1.20/compiler/layout-13.frag
@@ -20,7 +20,7 @@
// * if more than one varying out variable is bound to the same
// number and index; or
//
-// * if the explicit binding assigments do not leave enough space
+// * if the explicit binding assignments do not leave enough space
// for the linker to automatically assign a location for a varying
// out array, which requires multiple contiguous locations."
diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test
index 31c0c693e..965f809cd 100644
--- a/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-location-to-sampler.shader_test
@@ -1,5 +1,5 @@
#
-# Tests that an opaque type (sampler) gets a location succesfully
+# Tests that an opaque type (sampler) gets a location successfully
#
[require]
GLSL >= 1.30
diff --git a/tests/spec/arb_framebuffer_object/GenerateMipmap-versus-READ_FRAMEBUFFER.c b/tests/spec/arb_framebuffer_object/GenerateMipmap-versus-READ_FRAMEBUFFER.c
index cc24d17af..6d23c0ff3 100644
--- a/tests/spec/arb_framebuffer_object/GenerateMipmap-versus-READ_FRAMEBUFFER.c
+++ b/tests/spec/arb_framebuffer_object/GenerateMipmap-versus-READ_FRAMEBUFFER.c
@@ -70,7 +70,7 @@ piglit_init(int argc, char **argv)
fprintf(stderr,
"Either OpenGL 3.0, or GL_ARB_framebuffer_object, or "
"GL_EXT_framebuffer_object and GL_EXT_framebuffer_blit "
- "is requred.\n");
+ "is required.\n");
piglit_report_result(PIGLIT_SKIP);
}
diff --git a/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c b/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c
index 4d23526a4..b4b7488c1 100644
--- a/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c
+++ b/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c
@@ -28,7 +28,7 @@
* variable number of output components.
*
* The value of GEOMETRY_VERTICES_OUT is limited by the implementation
- * dependend constants MAX_GEOMETRY_OUTPUT_VERTICES and
+ * dependent constants MAX_GEOMETRY_OUTPUT_VERTICES and
* MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS.
*
* From the ARB_geometry_shader4 spec (section Errors):
@@ -126,7 +126,7 @@ test_geometry_vertices_out(const GLuint prog)
* > MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, the spec requires
* ProgramParameter to throw an INVALID_VALUE and subsequent linking to
* fail.
- * But the number of output components can only be infered from the
+ * But the number of output components can only be inferred from the
* geometry shader source (and a geometry shader might not even be
* attached to the program object when ProgramParameter is called).
* So, ignore any errors generated from ProgramParameter and only check
diff --git a/tests/spec/arb_geometry_shader4/linker/2darray-vertex-index-oob.shader_test b/tests/spec/arb_geometry_shader4/linker/2darray-vertex-index-oob.shader_test
index 60db7e918..05d0587e9 100644
--- a/tests/spec/arb_geometry_shader4/linker/2darray-vertex-index-oob.shader_test
+++ b/tests/spec/arb_geometry_shader4/linker/2darray-vertex-index-oob.shader_test
@@ -29,7 +29,7 @@ varying out float gs_out;
void main()
{
- /* This sould fail at link time once the size of the outer dimension of
+ /* This should fail at link time once the size of the outer dimension of
* gs_input (3) is known.
*/
float s = gs_input[3][0];
diff --git a/tests/spec/arb_get_program_binary/api-errors.c b/tests/spec/arb_get_program_binary/api-errors.c
index 5b104bb43..9b1356502 100644
--- a/tests/spec/arb_get_program_binary/api-errors.c
+++ b/tests/spec/arb_get_program_binary/api-errors.c
@@ -23,7 +23,7 @@
/**
* \file coverage.c
- * Attempt quering every enum in the spec. Sanity check initial values.
+ * Attempt querying every enum in the spec. Sanity check initial values.
*
* GL_NUM_PROGRAM_BINARY_FORMATS and GL_PROGRAM_BINARY_FORMATS are not
* covered by this test because they are heavily covered by the
diff --git a/tests/spec/arb_get_program_binary/gpb-common.c b/tests/spec/arb_get_program_binary/gpb-common.c
index 438e4992d..224173d5d 100644
--- a/tests/spec/arb_get_program_binary/gpb-common.c
+++ b/tests/spec/arb_get_program_binary/gpb-common.c
@@ -76,7 +76,7 @@ gpb_restore_program(GLuint prog, void *binary, GLsizei length, GLenum format)
glProgramBinary(prog, format, binary, length);
if (!piglit_check_gl_error(GL_NO_ERROR)) {
fprintf(stderr, "glProgramBinary error "
- "(should not happend according to spec.)\n");
+ "(should not happen according to spec.)\n");
piglit_report_result(PIGLIT_FAIL);
}
diff --git a/tests/spec/arb_get_program_binary/retrievable_hint.c b/tests/spec/arb_get_program_binary/retrievable_hint.c
index a81a9f63b..9d6e2c651 100644
--- a/tests/spec/arb_get_program_binary/retrievable_hint.c
+++ b/tests/spec/arb_get_program_binary/retrievable_hint.c
@@ -23,7 +23,7 @@
/**
* \file coverage.c
- * Attempt quering every enum in the spec. Sanity check initial values.
+ * Attempt querying every enum in the spec. Sanity check initial values.
*
* GL_NUM_PROGRAM_BINARY_FORMATS and GL_PROGRAM_BINARY_FORMATS are not
* covered by this test because they are heavily covered by the
diff --git a/tests/spec/arb_get_texture_sub_image/errors.c b/tests/spec/arb_get_texture_sub_image/errors.c
index 4b99d1cc2..a733d6c20 100644
--- a/tests/spec/arb_get_texture_sub_image/errors.c
+++ b/tests/spec/arb_get_texture_sub_image/errors.c
@@ -125,7 +125,7 @@ test_buffer_size(void)
if (!piglit_check_gl_error(GL_INVALID_OPERATION))
pass = false;
- /* Test getting a quadrant, sufficent buffer size */
+ /* Test getting a quadrant, sufficient buffer size */
glPixelStorei(GL_PACK_SKIP_ROWS, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
@@ -137,7 +137,7 @@ test_buffer_size(void)
if (!piglit_check_gl_error(GL_NO_ERROR))
pass = false;
- /* Test getting a quadrant, insufficent buffer size */
+ /* Test getting a quadrant, insufficient buffer size */
glPixelStorei(GL_PACK_SKIP_ROWS, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
@@ -194,7 +194,7 @@ test_invalid_values(void)
if (!piglit_check_gl_error(GL_INVALID_VALUE))
pass = false;
- /* Test non-existant level */
+ /* Test non-existent level */
glGetTextureSubImage(tex, 4,
0, 0, 0, /* offset */
8, 8, 1, /* size */
diff --git a/tests/spec/arb_get_texture_sub_image/get.c b/tests/spec/arb_get_texture_sub_image/get.c
index 4abf3a596..a0ba906f7 100644
--- a/tests/spec/arb_get_texture_sub_image/get.c
+++ b/tests/spec/arb_get_texture_sub_image/get.c
@@ -194,7 +194,7 @@ test_getsubimage(GLenum target,
y1 = MAX2(1, mip_height / 3);
z1 = MAX2(1, mip_depth / 3);
if (intFormat == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) {
- /* x1, y1 must be a multipe of 4 */
+ /* x1, y1 must be a multiple of 4 */
x1 &= ~0x3;
y1 &= ~0x3;
}
diff --git a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-multiple-samplers.shader_test b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-multiple-samplers.shader_test
index b717196d2..8e53c62db 100644
--- a/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-multiple-samplers.shader_test
+++ b/tests/spec/arb_gpu_shader5/execution/sampler_array_indexing/fs-struct-nonconst-multiple-samplers.shader_test
@@ -1,5 +1,5 @@
# This test verifies that dynamic uniform indexing of samplers inside
-# a stuct array in the fragment shader behaves correctly.
+# a struct array in the fragment shader behaves correctly.
[require]
GLSL >= 1.50
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/uniform-invalid-operation.c b/tests/spec/arb_gpu_shader_fp64/execution/uniform-invalid-operation.c
index aa61afdcc..1bd051200 100644
--- a/tests/spec/arb_gpu_shader_fp64/execution/uniform-invalid-operation.c
+++ b/tests/spec/arb_gpu_shader_fp64/execution/uniform-invalid-operation.c
@@ -25,7 +25,7 @@
* \file uniform-invalid-operation.c
*
* From the GL_ARB_gpu_shader_fp64 spec:
- * "regarding INVALID_OPERATION errors in Uniform* comamnds, if the type of
+ * "regarding INVALID_OPERATION errors in Uniform* commands, if the type of
* the uniform declared in the shader does not match the component type and
* count indicated in the Uniform* command name (where a boolean uniform
* component type is considered to match any of the Uniform*i{v},
diff --git a/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ishr.shader_test b/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ishr.shader_test
index f6a6ba542..49be888a4 100644
--- a/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ishr.shader_test
+++ b/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ishr.shader_test
@@ -38,7 +38,7 @@ void main()
/* This is INTENTIONALLY not a loop. Putting it in a loop causes the
* optimization that generates the extract instructions to trigger
* before the shift count is known to be a constant. The effectively
- * prevents the bad code generation in the i965 driver from occuring.
+ * prevents the bad code generation in the i965 driver from occurring.
*/
i = 0;
result = (ival[i] << (56u - (i * 8u))) >> 56u;
diff --git a/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ushr.shader_test b/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ushr.shader_test
index 30844ea0b..bbad7ddd9 100644
--- a/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ushr.shader_test
+++ b/tests/spec/arb_gpu_shader_int64/execution/fs-ishl-then-ushr.shader_test
@@ -38,7 +38,7 @@ void main()
/* This is INTENTIONALLY not a loop. Putting it in a loop causes the
* optimization that generates the extract instructions to trigger
* before the shift count is known to be a constant. The effectively
- * prevents the bad code generation in the i965 driver from occuring.
+ * prevents the bad code generation in the i965 driver from occurring.
*/
i = 0;
result = (ival[i] << (56u - (i * 8u))) >> 56u;
diff --git a/tests/spec/arb_gpu_shader_int64/execution/fs-ishr-and-mask.shader_test b/tests/spec/arb_gpu_shader_int64/execution/fs-ishr-and-mask.shader_test
index fa1509dfa..897d97f0e 100644
--- a/tests/spec/arb_gpu_shader_int64/execution/fs-ishr-and-mask.shader_test
+++ b/tests/spec/arb_gpu_shader_int64/execution/fs-ishr-and-mask.shader_test
@@ -38,7 +38,7 @@ void main()
/* This is INTENTIONALLY not a loop. Putting it in a loop causes the
* optimization that generates the extract instructions to trigger
* before the shift count is known to be a constant. The effectively
- * prevents the bad code generation in the i965 driver from occuring.
+ * prevents the bad code generation in the i965 driver from occurring.
*/
i = 0;
result = (ival[i] >> (i * 8u)) & 0x0FFl;
diff --git a/tests/spec/arb_gpu_shader_int64/execution/fs-ushr-and-mask.shader_test b/tests/spec/arb_gpu_shader_int64/execution/fs-ushr-and-mask.shader_test
index 96519624b..36b577c2b 100644
--- a/tests/spec/arb_gpu_shader_int64/execution/fs-ushr-and-mask.shader_test
+++ b/tests/spec/arb_gpu_shader_int64/execution/fs-ushr-and-mask.shader_test
@@ -38,7 +38,7 @@ void main()
/* This is INTENTIONALLY not a loop. Putting it in a loop causes the
* optimization that generates the extract instructions to trigger
* before the shift count is known to be a constant. The effectively
- * prevents the bad code generation in the i965 driver from occuring.
+ * prevents the bad code generation in the i965 driver from occurring.
*/
i = 0;
result = (ival[i] >> (i * 8u)) & 0x0FFul;
diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 67f04b133..ba27fac48 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -151,7 +151,7 @@ test_data_value_at_index(test_data *data,
{
if (index > data->params_size || index < 0) {
fprintf(stderr, "ERROR: invalid index while retrieving"
- " data from auxiliar test data\n");
+ " data from auxiliary test data\n");
return -1;
}
@@ -329,7 +329,7 @@ void print_failing_case_full(const GLenum target, const GLenum internalformat,
* the cases where the set of returned values is not specified in
* detail by the spec (like INTERNALFORMAT_PREFERRED). On that case,
* it is not tested the returned value, and just tested that if not
- * suppported, the returned value is the usupported value defined by
+ * supported, the returned value is the unsupported value defined by
* the spec.
*
*/
@@ -875,7 +875,7 @@ check_query2_target_dependencies(const GLenum target)
return true;
}
-/* Returns is @pname and @target dependencies are fullfilled */
+/* Returns is @pname and @target dependencies are fulfilled */
bool
check_query2_dependencies(const GLenum pname,
const GLenum target)
@@ -1010,7 +1010,7 @@ test_data_set_value_at_index(test_data *data,
{
if (index > data->params_size || index < 0) {
fprintf(stderr, "ERROR: invalid index while setting"
- " auxiliar test data\n");
+ " auxiliary test data\n");
return;
}
@@ -1027,18 +1027,18 @@ test_data_equal_at_index(test_data *data,
unsigned index)
{
if (data->testing64 != data_copy->testing64) {
- fprintf(stderr, "ERROR: trying to compare imcompatible"
- " auxiliar test data structures\n");
+ fprintf(stderr, "ERROR: trying to compare incompatible"
+ " auxiliary test data structures\n");
return false;
}
if (data->params_size != data_copy->params_size) {
- fprintf(stderr, "ERROR: trying to compare imcompatible"
- " auxiliar test data structures\n");
+ fprintf(stderr, "ERROR: trying to compare incompatible"
+ " auxiliary test data structures\n");
return false;
}
if (index > data->params_size) {
fprintf(stderr, "ERROR: invalid index while setting"
- " auxiliar test data\n");
+ " auxiliary test data\n");
return false;
}
diff --git a/tests/spec/arb_internalformat_query2/generic-pname-checks.c b/tests/spec/arb_internalformat_query2/generic-pname-checks.c
index bd44da038..bbb922920 100644
--- a/tests/spec/arb_internalformat_query2/generic-pname-checks.c
+++ b/tests/spec/arb_internalformat_query2/generic-pname-checks.c
@@ -244,7 +244,7 @@ piglit_display(void)
/*
* Executes try_basic on a list of pnames/possible values.
*
- * check_basic and try_basic are splitted because for some pnames, we
+ * check_basic and try_basic are split because for some pnames, we
* would need to check more than just try_basic.
*/
static bool
diff --git a/tests/spec/arb_internalformat_query2/max-dimensions.c b/tests/spec/arb_internalformat_query2/max-dimensions.c
index 50190d56d..881d36ea8 100644
--- a/tests/spec/arb_internalformat_query2/max-dimensions.c
+++ b/tests/spec/arb_internalformat_query2/max-dimensions.c
@@ -316,7 +316,7 @@ try(const GLenum *targets, unsigned num_targets,
value_test = test_data_is_unsupported_response(data, pname);
} else {
/*
- * If suppported and enough dimensions, we compare against the values
+ * If supported and enough dimensions, we compare against the values
* returned by GetInteger
*/
value_test = check_params_against_get_integer(data,
@@ -607,7 +607,7 @@ check_against_combined_dimensions(test_data *data,
*
* This method compares against zero if unsupported. If supported it
* computes the value using MAX_WIDTH, MAX_HEIGHT, MAX_DEPTH,
- * MAX_LAYERS and SAMPLES, and compare it agains the returned value.
+ * MAX_LAYERS and SAMPLES, and compare it against the returned value.
*/
static bool
try_max_combined_dimensions(const GLenum *targets, unsigned num_targets,
diff --git a/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c b/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c
index bcb759d26..7cf18d89a 100644
--- a/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c
+++ b/tests/spec/arb_map_buffer_range/map_buffer_range_error_check.c
@@ -80,7 +80,7 @@ piglit_init(int argc, char *argv[])
if (!piglit_check_gl_error(GL_INVALID_VALUE))
piglit_report_result(PIGLIT_FAIL);
- /* offset + lenght > GL_BUFFER_SIZE */
+ /* offset + length > GL_BUFFER_SIZE */
glMapBufferRange(target, 1, GL_BUFFER_SIZE, access);
if (!piglit_check_gl_error(GL_INVALID_VALUE))
piglit_report_result(PIGLIT_FAIL);
diff --git a/tests/spec/arb_map_buffer_range/map_buffer_range_test.c b/tests/spec/arb_map_buffer_range/map_buffer_range_test.c
index 493924cbe..f0a793e7a 100644
--- a/tests/spec/arb_map_buffer_range/map_buffer_range_test.c
+++ b/tests/spec/arb_map_buffer_range/map_buffer_range_test.c
@@ -60,14 +60,14 @@ clear_buffer(GLenum target)
{
if (piglit_is_extension_supported("GL_ARB_clear_buffer_object")) {
/* Clear the buffer just to make the device busy, so that
- * the driver can't optimize MapBufferRange to unsychronized
+ * the driver can't optimize MapBufferRange to unsynchronized
* without explicit_flush.
*/
glClearBufferData(target, GL_R32I, GL_RED_INTEGER, GL_INT, NULL);
}
}
-/* This test relies on simple patterns, so using offets which are multiples of
+/* This test relies on simple patterns, so using offsets which are multiples of
* 0x100 is bad
*/
void
diff --git a/tests/spec/arb_occlusion_query/occlusion_query_conform.c b/tests/spec/arb_occlusion_query/occlusion_query_conform.c
index df82a35fc..1d22b413c 100644
--- a/tests/spec/arb_occlusion_query/occlusion_query_conform.c
+++ b/tests/spec/arb_occlusion_query/occlusion_query_conform.c
@@ -104,7 +104,7 @@ conformOQ_GetObjivAval_multi1(void *data)
piglit_draw_rect(-0.51, 0.51, 0.51, -0.51);
glEndQueryARB(GL_SAMPLES_PASSED_ARB);
- /* draw the 2nd box (blue) which is occluded by the occluder throughly */
+ /* draw the 2nd box (blue) which is occluded by the occluder thoroughly */
glBeginQueryARB(GL_SAMPLES_PASSED_ARB, id);
glColor3f(0, 0, 1);
piglit_draw_rect(-0.4, 0.4, 0.4, -0.4);
@@ -126,7 +126,7 @@ conformOQ_GetObjivAval_multi1(void *data)
return passed > 0 ? PIGLIT_FAIL : PIGLIT_PASS;
}
-/* If mutiple queries are issued on the same target and diff ids prior
+/* If multiple queries are issued on the same target and diff ids prior
* to calling GetQueryObject[u]iVARB, the results should be
* corresponding to those queries (ids) respectively.
*/
diff --git a/tests/spec/arb_program_interface_query/getprogramresourceindex.c b/tests/spec/arb_program_interface_query/getprogramresourceindex.c
index 16b38e2d5..f3491f491 100755
--- a/tests/spec/arb_program_interface_query/getprogramresourceindex.c
+++ b/tests/spec/arb_program_interface_query/getprogramresourceindex.c
@@ -146,7 +146,7 @@ struct subtest_index_t {
GLenum programInterface;
const char *name;
bool valid_index;
- GLint expect_value; /* -1, means don't check for an epected value */
+ GLint expect_value; /* -1, means don't check for an expected value */
GLenum expected_error;
};
diff --git a/tests/spec/arb_program_interface_query/getprogramresourceiv.c b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
index e55cf96ac..571ae7f2e 100755
--- a/tests/spec/arb_program_interface_query/getprogramresourceiv.c
+++ b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
@@ -820,7 +820,7 @@ check_prop(GLuint prog, GLenum programInterface, int index, const char *name,
break;
}
- /* harcode the index test for GL_ATOMIC_COUNTER_BUFFER */
+ /* hardcode the index test for GL_ATOMIC_COUNTER_BUFFER */
if (programInterface == GL_ATOMIC_COUNTER_BUFFER) {
if (values[0] != 0) {
diff --git a/tests/spec/arb_program_interface_query/resource-query.c b/tests/spec/arb_program_interface_query/resource-query.c
index b94a50bc8..1ea96d970 100755
--- a/tests/spec/arb_program_interface_query/resource-query.c
+++ b/tests/spec/arb_program_interface_query/resource-query.c
@@ -303,8 +303,8 @@ static const char *st_r_tes_sub_uni[] = {"TESS_EVALUATION", NULL};
* include all active variables for the interface, including any active
* built-in variables.
*
- * For PROGRAM_INPUT and PROGRAM_OUTPUT interfaces for shaders that recieve
- * or produce patch primitves, the active resource list will include both
+ * For PROGRAM_INPUT and PROGRAM_OUTPUT interfaces for shaders that receive
+ * or produce patch primitives, the active resource list will include both
* per-vertex and per-patch inputs and outputs.
*
* For the TRANSFORM_FEEDBACK_VARYING interface, the active resource list
diff --git a/tests/spec/arb_provoking_vertex/provoking-vertex-initial.c b/tests/spec/arb_provoking_vertex/provoking-vertex-initial.c
index d4031a8c9..72eab9719 100644
--- a/tests/spec/arb_provoking_vertex/provoking-vertex-initial.c
+++ b/tests/spec/arb_provoking_vertex/provoking-vertex-initial.c
@@ -22,7 +22,7 @@
*/
/**
- * Test that the intitial value of PROVOKING_VERTEX is LAST_VERTEX_CONVENTION
+ * Test that the initial value of PROVOKING_VERTEX is LAST_VERTEX_CONVENTION
*
* Section 2.18(Flatshading) of OpenGL 3.2 Core says:
* "The initial value of the provoking vertex mode is LAST_VERTEX_CONVENTION."
diff --git a/tests/spec/arb_query_buffer_object/qbo.c b/tests/spec/arb_query_buffer_object/qbo.c
index 3ba11ee26..5e99e79df 100644
--- a/tests/spec/arb_query_buffer_object/qbo.c
+++ b/tests/spec/arb_query_buffer_object/qbo.c
@@ -27,8 +27,8 @@
* \file qbo.c
* Tests ARB_query_buffer_object
* - synchronous wait for result
- * - asynchrounous result, default value is left intact if result unavailable
- * - asynchrounous result, retrieve result to client memory before & after
+ * - asynchronous result, default value is left intact if result unavailable
+ * - asynchronous result, retrieve result to client memory before & after
*/
#include "common.h"
diff --git a/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp b/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp
index 105f8377e..cea1f88e8 100644
--- a/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp
+++ b/tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp
@@ -132,7 +132,7 @@ piglit_init(int argc, char**argv)
msConfig.num_tex_attachments = 1;
multisampled_fbo.setup(msConfig);
- /* Reduced tolerence for stricter color matching */
+ /* Reduced tolerance for stricter color matching */
piglit_set_tolerance_for_bits(16, 16, 16, 16);
draw_prog_left = piglit_build_simple_program(
"#version 130\n"
diff --git a/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp b/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp
index 36ede0d7e..9216964da 100644
--- a/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp
+++ b/tests/spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp
@@ -144,7 +144,7 @@ piglit_init(int argc, char**argv)
msConfig.tex_attachment[1] = GL_COLOR_ATTACHMENT1;
multisampled_fbo.setup(msConfig);
- /* Reduced tolerence for stricter color matching */
+ /* Reduced tolerance for stricter color matching */
piglit_set_tolerance_for_bits(16, 16, 16, 16);
draw_prog_left = piglit_build_simple_program(
"#version 130\n"
diff --git a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt
index ce257ca2e..37d19e3c3 100644
--- a/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt
+++ b/tests/spec/arb_separate_shader_objects/CMakeLists.gl.txt
@@ -31,3 +31,4 @@ piglit_add_executable (arb_separate_shader_object-UseProgramStages-non-separable
piglit_add_executable (arb_separate_shader_object-ValidateProgramPipeline ValidateProgramPipeline.c)
piglit_add_executable (arb_separate_shader_object-atomic-counter atomic-counter.c)
piglit_add_executable (arb_separate_shader_object-xfb-rendezvous_by_location xfb-rendezvous_by_location.c sso-common.c)
+piglit_add_executable (arb_separate_shader_object-xfb-explicit-location-array xfb-explicit-location-array.c)
diff --git a/tests/spec/arb_separate_shader_objects/ProgramUniform-coverage.c b/tests/spec/arb_separate_shader_objects/ProgramUniform-coverage.c
index 5763d155d..95ef98a64 100644
--- a/tests/spec/arb_separate_shader_objects/ProgramUniform-coverage.c
+++ b/tests/spec/arb_separate_shader_objects/ProgramUniform-coverage.c
@@ -219,7 +219,7 @@ random_uints(unsigned int *v, unsigned count)
* \name Data checking functions.
*
* Each of these functions verifies that one set of data matches another set
- * of data. If a discrepency is found, the failing location is logged.
+ * of data. If a discrepancy is found, the failing location is logged.
*/
/*@{*/
static bool
diff --git a/tests/spec/arb_separate_shader_objects/api-errors.c b/tests/spec/arb_separate_shader_objects/api-errors.c
index 1d6069e11..fd36ce951 100644
--- a/tests/spec/arb_separate_shader_objects/api-errors.c
+++ b/tests/spec/arb_separate_shader_objects/api-errors.c
@@ -24,7 +24,7 @@
/**
* \file api-errors.c
- * Verify miscelaneous API error conditions from the specification.
+ * Verify miscellaneous API error conditions from the specification.
*/
#include "piglit-util-gl.h"
#include "sso-common.h"
diff --git a/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c b/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c
index c9c673a54..4e2ffeccd 100644
--- a/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c
+++ b/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c
@@ -26,13 +26,13 @@
* Simple test for separate shader objects that use rendezvous-by-location.
*
* There are two ways one might expect rendezvous-by-location to fail. One
- * predicatble failure mode is for variables between two program objects to be
- * linked in the order they appear in the shader text. Another predicatble
+ * predictable failure mode is for variables between two program objects to be
+ * linked in the order they appear in the shader text. Another predictable
* failure mode is for variables between two program objects to be linked by
* name.
*
- * This test tries both modes using a single fragement shader program. This
- * program outputs two varibles, a and b, with locations specified. Two
+ * This test tries both modes using a single fragment shader program. This
+ * program outputs two variables, a and b, with locations specified. Two
* fragment shader programs are created, each having input variables a and b,
* with locations specified. In the first case, a and b are listed in the
* same order as in the vertex shader, but the locations are reversed (vertex
diff --git a/tests/spec/arb_separate_shader_objects/xfb-explicit-location-array.c b/tests/spec/arb_separate_shader_objects/xfb-explicit-location-array.c
new file mode 100644
index 000000000..e76207653
--- /dev/null
+++ b/tests/spec/arb_separate_shader_objects/xfb-explicit-location-array.c
@@ -0,0 +1,298 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/* Tests xfb with explicit locations. Specifically this was written to test
+ * a mesa bug with the handling of xfb output arrays that have an explicit
+ * location.
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+static const char vs_pass_thru_text[] =
+ "#version 150\n"
+ "void main() {\n"
+ " gl_Position = vec4(0.0);\n"
+ "}\n";
+
+static const char vs_shader_text[] =
+ "#version 150\n"
+ "#extension GL_ARB_separate_shader_objects: require\n"
+ "\n"
+ "out float x1_out;\n"
+ "layout(location = 4) out float x2_out[2];\n"
+ "layout(location = 6) out vec3 x3_out;\n"
+ "layout(location = 2) out float y1_out;\n"
+ "layout(location = 3) out vec4 y2_out;\n"
+ "void main() {\n"
+ " gl_Position = vec4(0.0);\n"
+ " x1_out = 1.0;\n"
+ " x2_out[0] = 2.0;\n"
+ " x2_out[1] = 3.0;\n"
+ " x3_out = vec3(4.0, 5.0, 6.0);\n"
+ " y1_out = 7.0;\n"
+ " y2_out = vec4(8.0, 9.0, 10.0, 11.0);\n"
+ "}";
+
+static const char gs_text_tmpl[] =
+ "#version 150\n"
+ "#extension GL_ARB_separate_shader_objects: require\n"
+ "#extension GL_ARB_gpu_shader5 : enable\n"
+ "#define INVOCATION_MAX_N %u\n"
+ "layout(points, invocations = INVOCATION_MAX_N) in;\n"
+ "layout(points, max_vertices = 1) out;\n"
+ "\n"
+ "out float x1_out;\n"
+ "layout(location = 4) out float x2_out[2];\n"
+ "layout(location = 6) out vec3 x3_out;\n"
+ "out vec3 not_captured1;\n"
+ "layout(location = 2) out float y1_out;\n"
+ "layout(location = 1) out vec4 y2_out;\n"
+ "out vec3 not_captured2;\n"
+ "void main() {\n"
+ " gl_Position = gl_in[0].gl_Position;\n"
+ " x1_out = 1.0 + gl_InvocationID;\n"
+ " x2_out[0] = 2.0 + gl_InvocationID;\n"
+ " x2_out[1] = 3.0 + gl_InvocationID;\n"
+ " x3_out = vec3(4.0 + gl_InvocationID, 5.0 + gl_InvocationID,\n"
+ " 6.0 + gl_InvocationID);\n"
+ " y1_out = 7.0 + gl_InvocationID;\n"
+ " y2_out = vec4(8.0 + gl_InvocationID, 9.0 + gl_InvocationID,\n"
+ " 10.0 + gl_InvocationID, 11.0 + gl_InvocationID);\n"
+ " not_captured1 = vec3(1.0);"
+ " not_captured2 = vec3(1.0);"
+ " EmitVertex();\n"
+ " EndPrimitive();\n"
+ "}";
+
+#define BUF_1_FLOAT_N 6
+#define BUF_2_FLOAT_N 5
+
+static void
+print_usage_and_exit(const char *prog_name)
+{
+ printf("Usage: %s <subtest>\n"
+ " where <subtest> is one of the following:\n"
+ " vs (vertex shader only)\n"
+ " gs (with geometry shader invoked once per stage)\n"
+ " gs_max (with geometry shader invoked max times per "
+ "stage)\n", prog_name);
+ piglit_report_result(PIGLIT_FAIL);
+}
+
+static void
+build_and_use_program(unsigned gs_invocation_n, const char *vs_text)
+{
+ GLuint prog;
+
+ if (gs_invocation_n == 0) {
+ prog = piglit_build_simple_program_multiple_shaders(
+ GL_VERTEX_SHADER, vs_text, 0);
+ } else {
+ char *gs_text;
+
+ (void)!asprintf(&gs_text, gs_text_tmpl, gs_invocation_n);
+ prog = piglit_build_simple_program_multiple_shaders(
+ GL_VERTEX_SHADER, vs_pass_thru_text,
+ GL_GEOMETRY_SHADER, gs_text, 0);
+ free(gs_text);
+ }
+
+ const char *varyings[] = {
+ "x1_out", "x2_out[0]", "x2_out[1]", "x3_out", "gl_NextBuffer", "gl_NextBuffer","y1_out", "y2_out"
+ };
+
+ glTransformFeedbackVaryings(prog, 8, varyings, GL_INTERLEAVED_ATTRIBS);
+
+ glLinkProgram(prog);
+ if (!piglit_link_check_status(prog))
+ piglit_report_result(PIGLIT_FAIL);
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ glUseProgram(prog);
+}
+
+static bool
+probe_buffers(const GLuint *xfb, const GLuint *queries, unsigned primitive_n)
+{
+ bool pass;
+ unsigned i;
+ GLuint query_result;
+ float *first;
+ float *second;
+
+ const unsigned first_n = primitive_n * BUF_1_FLOAT_N;
+ const unsigned second_n = primitive_n * BUF_2_FLOAT_N;
+
+ glGetQueryObjectuiv(queries[0], GL_QUERY_RESULT, &query_result);
+ if (query_result != primitive_n) {
+ printf("Expected %u primitives written, got %u\n",
+ primitive_n, query_result);
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
+ glGetQueryObjectuiv(queries[1], GL_QUERY_RESULT, &query_result);
+ if (query_result != primitive_n) {
+ printf("Expected %u primitives generated, got %u\n",
+ primitive_n, query_result);
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
+ first = malloc(first_n * sizeof(float));
+ second = malloc(second_n * sizeof(float));
+
+ for (i = 0; i < primitive_n; ++i) {
+ first[i * BUF_1_FLOAT_N + 0] = i + 1.0; /* x1 */
+ first[i * BUF_1_FLOAT_N + 1] = i + 2.0; /* x2[0] */
+ first[i * BUF_1_FLOAT_N + 2] = i + 3.0; /* x2[1] */
+ first[i * BUF_1_FLOAT_N + 3] = i + 4.0; /* x3[0] */
+ first[i * BUF_1_FLOAT_N + 4] = i + 5.0; /* x3[1] */
+ first[i * BUF_1_FLOAT_N + 5] = i + 6.0; /* x3[2] */
+
+ second[i * BUF_2_FLOAT_N + 0] = i + 7.0; /* y1 */
+ second[i * BUF_2_FLOAT_N + 1] = i + 8.0; /* y2[0] */
+ second[i * BUF_2_FLOAT_N + 2] = i + 9.0; /* y2[1] */
+ second[i * BUF_2_FLOAT_N + 3] = i + 10.0; /* y2[2] */
+ second[i * BUF_2_FLOAT_N + 4] = i + 11.0; /* y2u3] */
+ }
+
+ pass = piglit_probe_buffer(xfb[0], GL_TRANSFORM_FEEDBACK_BUFFER,
+ "first", 1, first_n, first);
+ pass = piglit_probe_buffer(xfb[1], GL_TRANSFORM_FEEDBACK_BUFFER,
+ "second", 1, second_n, second) &&
+ pass;
+
+ free(first);
+ free(second);
+
+ return pass;
+}
+
+static unsigned
+parse_args(int argc, char **argv, const char **vs_text)
+{
+ GLint gs_invocation_n;
+
+ if (argc != 2)
+ print_usage_and_exit(argv[0]);
+
+ if (strcmp(argv[1], "vs") == 0) {
+ *vs_text = vs_shader_text;
+ return 0;
+ }
+
+ piglit_require_extension("GL_ARB_gpu_shader5");
+ if (strcmp(argv[1], "gs") == 0)
+ return 1;
+
+ if (strcmp(argv[1], "gs_max") != 0)
+ print_usage_and_exit(argv[0]);
+
+ glGetIntegerv(GL_MAX_GEOMETRY_SHADER_INVOCATIONS, &gs_invocation_n);
+ if (gs_invocation_n <= 0) {
+ printf("Maximum amount of geometry shader invocations "
+ "needs to be positive (%u).\n", gs_invocation_n);
+ piglit_report_result(PIGLIT_FAIL);
+ }
+
+ return gs_invocation_n;
+}
+
+void
+piglit_init(int argc, char **argv)
+{
+ bool pass;
+ unsigned primitive_n, gs_invocation_n;
+ const char *vs_text;
+ GLuint queries[2];
+ GLuint xfb[2];
+ GLuint vao;
+
+ piglit_require_extension("GL_ARB_transform_feedback3");
+ piglit_require_extension("GL_ARB_separate_shader_objects");
+
+
+ gs_invocation_n = parse_args(argc, argv, &vs_text);
+
+ /* Zero invocations means the feedback is produced by vertex shader */
+ primitive_n = gs_invocation_n ? gs_invocation_n : 1;
+
+ build_and_use_program(gs_invocation_n, vs_text);
+
+ /* Set up the transform feedback buffers. */
+ glGenBuffers(ARRAY_SIZE(xfb), xfb);
+ glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, xfb[0]);
+ glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER,
+ primitive_n * BUF_1_FLOAT_N * sizeof(float), NULL,
+ GL_STREAM_READ);
+ glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 2, xfb[1]);
+ glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER,
+ primitive_n * BUF_2_FLOAT_N * sizeof(float), NULL,
+ GL_STREAM_READ);
+
+ /* Test only records using transform feedback. */
+ glEnable(GL_RASTERIZER_DISCARD);
+
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ glGenQueries(2, queries);
+ glBeginQuery(GL_PRIMITIVES_GENERATED, queries[0]);
+ glBeginQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, queries[1]);
+
+ /* Test is run under desktop OpenGL 3.2 -> use of VAOs is required */
+ glGenVertexArrays(1, &vao);
+ glBindVertexArray(vao);
+
+ /* Draw and record */
+ glBeginTransformFeedback(GL_POINTS);
+ glDrawArrays(GL_POINTS, 0, 1);
+ glEndQuery(GL_PRIMITIVES_GENERATED);
+ glEndQuery(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
+ glEndTransformFeedback();
+ glDeleteVertexArrays(1, &vao);
+
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ piglit_report_result(PIGLIT_FAIL);
+
+ pass = probe_buffers(xfb, queries, primitive_n);
+
+ glDeleteBuffers(2, xfb);
+ glDeleteQueries(2, queries);
+
+ piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
+}
+
+enum piglit_result
+piglit_display(void)
+{
+ /* Should never be reached */
+ return PIGLIT_FAIL;
+}
diff --git a/tests/spec/arb_shader_atomic_counters/max-counters.c b/tests/spec/arb_shader_atomic_counters/max-counters.c
index f3df5f8ba..19b0444d5 100644
--- a/tests/spec/arb_shader_atomic_counters/max-counters.c
+++ b/tests/spec/arb_shader_atomic_counters/max-counters.c
@@ -23,7 +23,7 @@
/** @file max-counters.c
*
- * Test that using more than the maximum number of suported atomic
+ * Test that using more than the maximum number of supported atomic
* counters, buffers or bindings fails with a linking error.
*/
diff --git a/tests/spec/arb_shader_image_load_store/execution/disable_early_z.shader_test b/tests/spec/arb_shader_image_load_store/execution/disable_early_z.shader_test
index e970757bd..2dc94f686 100644
--- a/tests/spec/arb_shader_image_load_store/execution/disable_early_z.shader_test
+++ b/tests/spec/arb_shader_image_load_store/execution/disable_early_z.shader_test
@@ -1,4 +1,4 @@
-# Test that Z runs lates when the fragment shader contains stores.
+# Test that Z runs later when the fragment shader contains stores.
#
[require]
GL >= 3.3
diff --git a/tests/spec/arb_shader_image_load_store/grid.c b/tests/spec/arb_shader_image_load_store/grid.c
index 7454e52f2..9e7e2c17f 100644
--- a/tests/spec/arb_shader_image_load_store/grid.c
+++ b/tests/spec/arb_shader_image_load_store/grid.c
@@ -261,7 +261,7 @@ generate_program_v(const struct grid_info grid, const char **sources)
GL_GEOMETRY_SHADER_BIT);
const unsigned stages =
(grid.stages |
- /* Make a full pipeline if a tesselation shader was
+ /* Make a full pipeline if a tessellation shader was
* requested. */
(grid.stages & tess_stages ? graphic_stages : 0) |
/* Make sure there is always a vertex and fragment
diff --git a/tests/spec/arb_tessellation_shader/execution/compatibility/vs-tcs-tes-clip-vertex-enables.shader_test b/tests/spec/arb_tessellation_shader/execution/compatibility/vs-tcs-tes-clip-vertex-enables.shader_test
index 546d785a6..20b3a0224 100644
--- a/tests/spec/arb_tessellation_shader/execution/compatibility/vs-tcs-tes-clip-vertex-enables.shader_test
+++ b/tests/spec/arb_tessellation_shader/execution/compatibility/vs-tcs-tes-clip-vertex-enables.shader_test
@@ -5,7 +5,7 @@
#
# To verify that each enable works, the combinations of enables were
# chosen such that:
-# - Every plane is enabled at least once and disbled at least once.
+# - Every plane is enabled at least once and disabled at least once.
# - Every plane is enabled and disabled in a different pattern.
#
# Note: Some implementations have bugs related to improper coordinate
diff --git a/tests/spec/arb_tessellation_shader/large-uniforms.c b/tests/spec/arb_tessellation_shader/large-uniforms.c
index 91bd30fc5..cc908d115 100644
--- a/tests/spec/arb_tessellation_shader/large-uniforms.c
+++ b/tests/spec/arb_tessellation_shader/large-uniforms.c
@@ -154,7 +154,7 @@ test_uniform_array(const GLenum shader, const int n, const bool expect_fail)
if (link_status && expect_fail) {
fprintf(stderr, "Program with %d uniform components in %s "
- "linked succesfully\n", n,
+ "linked successfully\n", n,
piglit_get_gl_enum_name(shader));
free(source_uniforms);
return false;
diff --git a/tests/spec/arb_tessellation_shader/layout-mismatch.c b/tests/spec/arb_tessellation_shader/layout-mismatch.c
index 988d26cfc..f752b3499 100644
--- a/tests/spec/arb_tessellation_shader/layout-mismatch.c
+++ b/tests/spec/arb_tessellation_shader/layout-mismatch.c
@@ -127,7 +127,7 @@ test_tcs_layout(const int i, const int j)
if (link_status && (i != j)) {
fprintf(stderr, "Program with different vertices "
- "specifications linked succesfully\n");
+ "specifications linked successfully\n");
return false;
}
if (!link_status && (i == j)) {
@@ -164,7 +164,7 @@ test_tes_layout(const char *const layout1, const char *const layout2,
if (link_status && (layout1 != layout2)) {
fprintf(stderr, "Program with different %s "
- "specifications linked succesfully\n", layout_name);
+ "specifications linked successfully\n", layout_name);
return false;
}
if (!link_status && (layout1 == layout2)) {
diff --git a/tests/spec/arb_tessellation_shader/tes-gs-max-output.cpp b/tests/spec/arb_tessellation_shader/tes-gs-max-output.cpp
index acfb5e714..23744e129 100644
--- a/tests/spec/arb_tessellation_shader/tes-gs-max-output.cpp
+++ b/tests/spec/arb_tessellation_shader/tes-gs-max-output.cpp
@@ -67,7 +67,7 @@ struct testcase {
unsigned tessfactor_u;
unsigned tessfactor_v;
unsigned num_invocations; /* GS invocations / instances */
- unsigned num_outputs; /* # vertex ouput per GS invocation */
+ unsigned num_outputs; /* # vertex output per GS invocation */
unsigned num_extra_components; /* # extra components per GS output vertex */
bool operator<(const testcase &o) const {
diff --git a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
index ce19c2951..c0fd55714 100644
--- a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
+++ b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
@@ -207,7 +207,7 @@ interpolate_square(const Vertex square[4],
/*
* Tesselates @square_pos, returning a set of vertex information and
* indices compatible to draw with glDrawElements at (@tesselated_pos,
- * @indices). @granularity is the number of vertexes per side. So the
+ * @indices). @granularity is the number of vertices per side. So the
* minimum should be 2.
*
* Is assumed that the vertex at @square_pos are in the order
@@ -231,7 +231,7 @@ util_tesselate_square(const Vertex square_pos[4],
if (granularity < 2) {
fprintf(stderr, "Granularity should be equal or greater to 2"
- " in order to tesselate a square. Setting it to 2.\n");
+ " in order to tessellate a square. Setting it to 2.\n");
granularity = 2;
}
diff --git a/tests/spec/arb_texture_buffer_object/texture-buffer-size-clamp.c b/tests/spec/arb_texture_buffer_object/texture-buffer-size-clamp.c
index 5696da5f1..b7cffeeae 100644
--- a/tests/spec/arb_texture_buffer_object/texture-buffer-size-clamp.c
+++ b/tests/spec/arb_texture_buffer_object/texture-buffer-size-clamp.c
@@ -249,7 +249,7 @@ piglit_init(int argc, char **argv)
"void main() {gl_Position = piglit_vertex;}";
static const char frag[] = "#version 140\n"
- "uniform samplerBuffer s;\n"
+ "uniform usamplerBuffer s;\n"
"uniform int size, maxSize;\n"
"void main()\n"
"{\n"
@@ -264,7 +264,7 @@ piglit_init(int argc, char **argv)
"#extension GL_ARB_shader_storage_buffer_object: require\n"
"#extension GL_ARB_shader_image_size: require\n"
"layout(local_size_x = 1) in;\n"
- "writeonly readonly uniform imageBuffer s;\n"
+ "writeonly readonly uniform uimageBuffer s;\n"
"layout(std430, binding=0) writeonly buffer SZ\n"
"{\n"
" int size;\n"
diff --git a/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c b/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c
index 95eeb04df..a16455112 100644
--- a/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c
+++ b/tests/spec/arb_texture_cube_map_array/sampler-cube-array-shadow.c
@@ -63,7 +63,7 @@ static GLfloat compvals[6][4] = { { -0.50, 0.00, 0.50, 0.00 },
#define STRIDE (9 * sizeof(GLfloat))
/* Setup interleaved vertex attributes for 6 * 4 vertices:
* 4 float vertex coordinates for drawing 6 quads aligned in a 3x2 grid with
- * some space inbetween.
+ * some space in between.
* 4 float texture coordinates for sampling one cube map face per quad.
* 1 float compare value for shadow texture fetch.
*/
diff --git a/tests/spec/arb_texture_storage_multisample/tex-param.c b/tests/spec/arb_texture_storage_multisample/tex-param.c
index bc40ecc82..531e71779 100644
--- a/tests/spec/arb_texture_storage_multisample/tex-param.c
+++ b/tests/spec/arb_texture_storage_multisample/tex-param.c
@@ -119,7 +119,7 @@ check_subtest(struct subtest *t)
return PIGLIT_FAIL;
}
- /* verify that the new value stuck (or didnt, if we expected failure) */
+ /* verify that the new value stuck (or didn't, if we expected failure) */
glGetTexParameteriv(GL_TEXTURE_2D_MULTISAMPLE, t->param, &val);
expected_val = t->expected_error == GL_NO_ERROR ? t->value : t->initial_value;
diff --git a/tests/spec/arb_texture_view/queries.c b/tests/spec/arb_texture_view/queries.c
index 026d97ece..b603791a1 100644
--- a/tests/spec/arb_texture_view/queries.c
+++ b/tests/spec/arb_texture_view/queries.c
@@ -42,7 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
PIGLIT_GL_TEST_CONFIG_END
/**
- * make sure default intial state is correct for textureView
+ * make sure default initial state is correct for textureView
* In OpenGL Core 4.3 spec see table 23.15 for default values.
*/
static bool
diff --git a/tests/spec/arb_timer_query/timestamp-get.c b/tests/spec/arb_timer_query/timestamp-get.c
index fc48d85b0..3fdf3813b 100644
--- a/tests/spec/arb_timer_query/timestamp-get.c
+++ b/tests/spec/arb_timer_query/timestamp-get.c
@@ -80,7 +80,7 @@ validate_times(GLint64 t1, GLint64 t2, GLint64 tolerance)
piglit_report_result(PIGLIT_FAIL);
}
- /* the tolerance of 1 milisecond seems to be sufficient */
+ /* the tolerance of 1 millisecond seems to be sufficient */
if (t2 - t1 > tolerance) {
printf("time 1 = %" PRIu64 " us\n", (uint64_t) t1 / 1000);
printf("time 2 = %" PRIu64 " us\n", (uint64_t) t2 / 1000);
diff --git a/tests/spec/arb_transform_feedback2/change-objects-while-paused.c b/tests/spec/arb_transform_feedback2/change-objects-while-paused.c
index b81fbd87a..e110e7c65 100644
--- a/tests/spec/arb_transform_feedback2/change-objects-while-paused.c
+++ b/tests/spec/arb_transform_feedback2/change-objects-while-paused.c
@@ -29,7 +29,7 @@
*
* - Bind an XFB object, start XFB, draw something, pause XFB.
*
- * - Bind a different XFB object, start XFB, draw someting, pause XFB.
+ * - Bind a different XFB object, start XFB, draw something, pause XFB.
*
* - Rebind the first XFB object, resume XFB, draw something, end XFB.
*
diff --git a/tests/spec/arb_transform_feedback3/begin_end.c b/tests/spec/arb_transform_feedback3/begin_end.c
index e95c6e657..104cb1f79 100644
--- a/tests/spec/arb_transform_feedback3/begin_end.c
+++ b/tests/spec/arb_transform_feedback3/begin_end.c
@@ -53,7 +53,7 @@ piglit_init(int argc, char **argv)
glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
&max_attrib_n);
if (!max_attrib_n) {
- printf("Maximum number of separete attributes is zero\n");
+ printf("Maximum number of separate attributes is zero\n");
piglit_report_result(PIGLIT_FAIL);
}
diff --git a/tests/spec/arb_transform_feedback3/set_invalid_varyings.c b/tests/spec/arb_transform_feedback3/set_invalid_varyings.c
index ee4b596a6..80124ed60 100644
--- a/tests/spec/arb_transform_feedback3/set_invalid_varyings.c
+++ b/tests/spec/arb_transform_feedback3/set_invalid_varyings.c
@@ -160,7 +160,7 @@ piglit_init(int argc, char **argv)
glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
&max_attrib_n);
if (!max_attrib_n) {
- printf("Maximum number of separete attributes is zero\n");
+ printf("Maximum number of separate attributes is zero\n");
piglit_report_result(PIGLIT_FAIL);
}
diff --git a/tests/spec/arb_transform_feedback3/set_varyings_with_invalid_args.c b/tests/spec/arb_transform_feedback3/set_varyings_with_invalid_args.c
index a9efccb19..96262f07a 100644
--- a/tests/spec/arb_transform_feedback3/set_varyings_with_invalid_args.c
+++ b/tests/spec/arb_transform_feedback3/set_varyings_with_invalid_args.c
@@ -97,7 +97,7 @@ piglit_init(int argc, char **argv)
glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
&max_attrib_n);
if (!max_attrib_n) {
- printf("Maximum number of separete attributes is zero\n");
+ printf("Maximum number of separate attributes is zero\n");
piglit_report_result(PIGLIT_FAIL);
}
diff --git a/tests/spec/arb_transform_feedback_overflow_query/basic.c b/tests/spec/arb_transform_feedback_overflow_query/basic.c
index 017335c98..6ccc0e850 100644
--- a/tests/spec/arb_transform_feedback_overflow_query/basic.c
+++ b/tests/spec/arb_transform_feedback_overflow_query/basic.c
@@ -326,7 +326,7 @@ run_subtest(int n_streams, int array_sizes[], int stream, GLuint query_type,
} else if (!strcmp(test_type, "buffer_object")) {
pass = overflow_buffer_object(query, expected);
} else {
- printf("Unkown test.\n");
+ printf("Unknown test.\n");
pass = PIGLIT_FAIL;
}
diff --git a/tests/spec/arb_vertex_program/get-limits-without-fp.c b/tests/spec/arb_vertex_program/get-limits-without-fp.c
index d4f2b3eab..6c2bedc61 100644
--- a/tests/spec/arb_vertex_program/get-limits-without-fp.c
+++ b/tests/spec/arb_vertex_program/get-limits-without-fp.c
@@ -29,7 +29,7 @@
* \file get-vp-limit-without-fp.c
*
* Test for the crash reported in bugs.freedesktop.org bug #24066.
- * This occured when the native limits of a vertex program are queried
+ * This occurred when the native limits of a vertex program are queried
* before a fragment program has been setup.
*/
diff --git a/tests/spec/arb_viewport_array/bounds.c b/tests/spec/arb_viewport_array/bounds.c
index 8d43e9f97..e3717c5db 100644
--- a/tests/spec/arb_viewport_array/bounds.c
+++ b/tests/spec/arb_viewport_array/bounds.c
@@ -74,7 +74,7 @@ viewport_bounds(GLint maxVP)
bool pass = true;
int i;
- /* intial values for x,y,w,h */
+ /* initial values for x,y,w,h */
for (i = 0; i < maxVP; i++) {
glGetFloati_v(GL_VIEWPORT, i, vp);
if (vp[0] != 0.0 || vp[1] != 0.0 ||
@@ -154,7 +154,7 @@ depth_range_bounds(GLint maxVP)
#endif
int i;
- /* intial values for near, far are 0.0, 1.0 repsectively */
+ /* initial values for near, far are 0.0, 1.0 respectively */
for (i = 0; i < maxVP; i++) {
#ifdef PIGLIT_USE_OPENGL
glGetDoublei_v(GL_DEPTH_RANGE, i, dr);
@@ -219,7 +219,7 @@ scissor_bounds(GLint maxVP)
bool pass = true;
int i;
- /* intial values for left, bottom, width, height */
+ /* initial values for left, bottom, width, height */
for (i = 0; i < maxVP; i++) {
glGetIntegeri_v(GL_SCISSOR_BOX, i, sc);
if (sc[0] != 0 || sc[1] != 0 || sc[2] != piglit_width ||
diff --git a/tests/spec/arb_viewport_array/queries.c b/tests/spec/arb_viewport_array/queries.c
index efd280b30..af9c20537 100644
--- a/tests/spec/arb_viewport_array/queries.c
+++ b/tests/spec/arb_viewport_array/queries.c
@@ -84,7 +84,7 @@ piglit_init(int argc, char **argv)
* depthrange-indices and viewport-indices tests.
* OpenGL 4.3 Core section 22.1 ref:
* "An INVALID_ENUM error is generated if target is not
- * indexed state queriable with these commands."
+ * indexed state queryable with these commands."
*/
for (i = 0; i < ARRAY_SIZE(tokens); i++) {
glGetFloati_v(tokens[i], 1, valf);
diff --git a/tests/spec/arb_viewport_array/render_scissor.c b/tests/spec/arb_viewport_array/render_scissor.c
index 93f07754a..b6e5b6374 100644
--- a/tests/spec/arb_viewport_array/render_scissor.c
+++ b/tests/spec/arb_viewport_array/render_scissor.c
@@ -52,7 +52,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
PIGLIT_GL_TEST_CONFIG_END
-/* number of viewport/scissor rectangle divisons in x and y */
+/* number of viewport/scissor rectangle divisions in x and y */
static const int divX=2, divY=3;
/**
@@ -128,7 +128,7 @@ draw_multi_scissor_rect(void)
* Draws a single quad full window size, with different scissor rectangles
* and different scissor test enables for each viewport index.
* Scissor rectangles or viewport restrict drawing to sub-area of full
- * window surface. Geometry shader is responsible for exapnding primitves
+ * window surface. Geometry shader is responsible for exapnding primitives
* to cover all divX * divY viewport/scissor indices. The function reads
* back the expected color to test if the scissored drawing was correct.
*/
diff --git a/tests/spec/arb_viewport_array/viewport_indices.c b/tests/spec/arb_viewport_array/viewport_indices.c
index 567f83d36..8f8aa0590 100644
--- a/tests/spec/arb_viewport_array/viewport_indices.c
+++ b/tests/spec/arb_viewport_array/viewport_indices.c
@@ -161,7 +161,7 @@ test_preserve_invalid_index(GLint maxVP)
GLboolean scEnabled;
int i;
- /* intialize all indices to know values */
+ /* initialize all indices to know values */
for (i = 0; i < maxVP; i++) {
glViewportIndexedfv(i, vp);
#ifdef PIGLIT_USE_OPENGL
diff --git a/tests/spec/ext_clear_texture/base-formats.c b/tests/spec/ext_clear_texture/base-formats.c
index edf8738fa..7eb5eb670 100644
--- a/tests/spec/ext_clear_texture/base-formats.c
+++ b/tests/spec/ext_clear_texture/base-formats.c
@@ -29,7 +29,7 @@
* texture where the first four texels are cleared to known values
* using separate calls to glClearTexSubImage. The values are chosen
* to potentially trigger problems with signed conversions for integer
- * textures. The restof the texture is initalised to zeroes. The textures
+ * textures. The restof the texture is initialised to zeroes. The textures
* are then read back by attaching them to a fbo and calling glReadPixels
* or glReadnPixelsKHR if robustness is supported.
*/
diff --git a/tests/spec/ext_disjoint_timer_query/simple-query.c b/tests/spec/ext_disjoint_timer_query/simple-query.c
index 17d054ce9..b7e4bb31e 100644
--- a/tests/spec/ext_disjoint_timer_query/simple-query.c
+++ b/tests/spec/ext_disjoint_timer_query/simple-query.c
@@ -24,7 +24,7 @@
/**
* @file
* Tests GL_EXT_disjoint_timer_query extension. Test does not to cover
- * the whole API as that is tested throughly by existing query tests for
+ * the whole API as that is tested thoroughly by existing query tests for
* desktop GL. Main objective is to test that timer queries work on OpenGL
* ES 2.0 and we can get GL_GPU_DISJOINT_EXT value from the driver.
*/
@@ -132,7 +132,7 @@ piglit_display(void)
glGetQueryObjectui64vEXT(query, GL_QUERY_RESULT_EXT, &time);
- /* Check if disjoint operation occured. */
+ /* Check if disjoint operation occurred. */
glGetInteger64vEXT(GL_GPU_DISJOINT_EXT, &disjoint);
if (!piglit_check_gl_error(GL_NO_ERROR))
piglit_report_result(PIGLIT_FAIL);
diff --git a/tests/spec/ext_external_objects/vk_vert_buf_update_errors.c b/tests/spec/ext_external_objects/vk_vert_buf_update_errors.c
index f0af16854..e37510085 100644
--- a/tests/spec/ext_external_objects/vk_vert_buf_update_errors.c
+++ b/tests/spec/ext_external_objects/vk_vert_buf_update_errors.c
@@ -165,7 +165,7 @@ piglit_display(void)
piglit_present_results();
- /* Checking that calling glBufferSubData updates buffer succesfully. */
+ /* Checking that calling glBufferSubData updates buffer successfully. */
glBindBuffer(GL_ARRAY_BUFFER, gl_vk_vb);
glBufferSubData(GL_ARRAY_BUFFER, 0, vk_vb.mobj.mem_sz, checkerboard);
if (glGetError() != GL_NO_ERROR) {
diff --git a/tests/spec/ext_framebuffer_multisample/accuracy.cpp b/tests/spec/ext_framebuffer_multisample/accuracy.cpp
index 76cb9e2ee..17667631f 100644
--- a/tests/spec/ext_framebuffer_multisample/accuracy.cpp
+++ b/tests/spec/ext_framebuffer_multisample/accuracy.cpp
@@ -27,12 +27,12 @@
*
* Verify the accuracy of multisample antialiasing.
*
- * This test utilizes the functions defined in common.cpp to verfify the
+ * This test utilizes the functions defined in common.cpp to verify the
* accuracy of MSAA.
*
* The test also accepts the following flags:
*
- * - "small": Causes the MSAA image to be renedered in extremely tiny
+ * - "small": Causes the MSAA image to be rendered in extremely tiny
* (16x16) tiles that are then stitched together. This verifies
* that MSAA works properly on very small buffers (a critical corner
* case on i965).
diff --git a/tests/spec/ext_framebuffer_multisample/blit-multiple-render-targets.cpp b/tests/spec/ext_framebuffer_multisample/blit-multiple-render-targets.cpp
index 2f5a37fba..ac25653fd 100644
--- a/tests/spec/ext_framebuffer_multisample/blit-multiple-render-targets.cpp
+++ b/tests/spec/ext_framebuffer_multisample/blit-multiple-render-targets.cpp
@@ -119,7 +119,7 @@ piglit_display()
glClearColor(0.0, 1.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
- /* Clear all color attachements of multisample_fbo to blue color */
+ /* Clear all color attachments of multisample_fbo to blue color */
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, multisample_fbo.handle);
glDrawBuffers(6, bufs);
glClearColor(0.0, 0.0, 1.0, 1.0);
diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
index 2e6ca4413..48e1ad4a5 100644
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
@@ -227,7 +227,7 @@ shader_compile(bool sample_alpha_to_coverage,
glBindAttribLocation(prog, 0, "pos");
glEnableVertexAttribArray(0);
- /* Linking is rquired after glBindFragDataLocation */
+ /* Linking is required after glBindFragDataLocation */
glLinkProgram(prog);
/* Set up uniforms */
@@ -902,7 +902,7 @@ ms_fbo_and_draw_buffers_setup(int samples,
ms_config.color_internalformat = color_buffer_zero_format;
ms_fbo.setup(ms_config);
- /* Create resolve_fbo with dimensions large enough to accomodate
+ /* Create resolve_fbo with dimensions large enough to accommodate
* all the draw buffers
*/
FboConfig resolve_config(0, pattern_width,
diff --git a/tests/spec/ext_framebuffer_multisample/fast-clear.c b/tests/spec/ext_framebuffer_multisample/fast-clear.c
index c0b249fb9..c5c4fbb64 100644
--- a/tests/spec/ext_framebuffer_multisample/fast-clear.c
+++ b/tests/spec/ext_framebuffer_multisample/fast-clear.c
@@ -27,7 +27,7 @@
* Clears a multisample texture with various formats to various
* different colors and then samples from it in a shader to ensure
* that the expected color is returned. This includes verifying that
- * when there are components missing they are overriden to the right
+ * when there are components missing they are overridden to the right
* value (such as GL_RED should report 0 for green and blue and 1 for
* the alpha). The main reason to do this is that the i965 driver has
* various different code paths to implement a fast clear optimisation
diff --git a/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp b/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp
index 8cda26d7e..d535a7f9f 100644
--- a/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp
+++ b/tests/spec/ext_framebuffer_multisample/sample-coverage.cpp
@@ -221,7 +221,7 @@ compute_expected(void)
for (i = 0; i < num_rects; i++) {
float samples_used = coverage[i] * num_samples;
- /* Exepected color values are computed only for integer
+ /* Expected color values are computed only for integer
* number of samples_used
*/
if(samples_used == (int)samples_used) {
diff --git a/tests/spec/ext_image_dma_buf_import/export.c b/tests/spec/ext_image_dma_buf_import/export.c
index 0380ef9a6..9d4754a0a 100644
--- a/tests/spec/ext_image_dma_buf_import/export.c
+++ b/tests/spec/ext_image_dma_buf_import/export.c
@@ -27,7 +27,7 @@
/**
* @file export.c
*
- * Test verifies that we can succesfully export imported dmabuf.
+ * Test verifies that we can successfully export imported dmabuf.
*/
PIGLIT_GL_TEST_CONFIG_BEGIN
diff --git a/tests/spec/ext_image_dma_buf_import/reimport-bug.c b/tests/spec/ext_image_dma_buf_import/reimport-bug.c
index 185604d29..807e2e1ab 100644
--- a/tests/spec/ext_image_dma_buf_import/reimport-bug.c
+++ b/tests/spec/ext_image_dma_buf_import/reimport-bug.c
@@ -27,7 +27,7 @@
/**
* @file reimport-bug.c
*
- * Test verifies that we can succesfully reimport and map a DMABUF. This
+ * Test verifies that we can successfully reimport and map a DMABUF. This
* specifically checks that drivers, which may map a DMABUF, invalidates any
* such mappings (as needed) when it is reimported. This test has been tuned
* specifically for the iris driver.
diff --git a/tests/spec/ext_occlusion_query_boolean/any-samples.c b/tests/spec/ext_occlusion_query_boolean/any-samples.c
index 4963346d4..d10e24cd6 100644
--- a/tests/spec/ext_occlusion_query_boolean/any-samples.c
+++ b/tests/spec/ext_occlusion_query_boolean/any-samples.c
@@ -24,7 +24,7 @@
/**
* @file
* Tests GL_EXT_occlusion_query_boolean extension. Test does not to cover
- * the whole API as that is tested throughly by existing arb_occlusion_query
+ * the whole API as that is tested thoroughly by existing arb_occlusion_query
* and arb_occlusion_query2 tests. Main objective is to test that boolean
* query works on OpenGL ES 2.0.
*/
diff --git a/tests/spec/ext_texture_env_combine/combine.c b/tests/spec/ext_texture_env_combine/combine.c
index 0b6486357..0254d94fd 100644
--- a/tests/spec/ext_texture_env_combine/combine.c
+++ b/tests/spec/ext_texture_env_combine/combine.c
@@ -1123,7 +1123,7 @@ run_multi_texture_test(void)
}
/* We do a really short, simple test for GL_ARB_texture_env_crossbar since the
- * preceeding tests are pretty comprehensive and the crossbar feature is just
+ * preceding tests are pretty comprehensive and the crossbar feature is just
* an incremental addition. Basically, if we have N texture units we run N
* tests. For test [i] we set texture unit [i] to fetch the texture color
* from unit [num_units - i - 1]. For units != i we use the constant color
@@ -1258,7 +1258,7 @@ piglit_init(int argc, char **argv)
{
piglit_require_extension("GL_EXT_texture_env_combine");
- /* Test the availability of the DOT3 extenstion */
+ /* Test the availability of the DOT3 extension */
have_dot3 = piglit_is_extension_supported("GL_EXT_texture_env_dot3");
have_crossbar =
diff --git a/tests/spec/ext_texture_swizzle/depth_texture_mode_and_swizzle.c b/tests/spec/ext_texture_swizzle/depth_texture_mode_and_swizzle.c
index 6f9d7f38c..cb87fad1e 100644
--- a/tests/spec/ext_texture_swizzle/depth_texture_mode_and_swizzle.c
+++ b/tests/spec/ext_texture_swizzle/depth_texture_mode_and_swizzle.c
@@ -26,7 +26,7 @@
*
* Tests the interactions between EXT_texture_swizzle and DEPTH_TEXTURE_MODE.
*
- * From the EXT_texture_swizzle specfication:
+ * From the EXT_texture_swizzle specification:
* "4) How does this interact with depth component textures?
*
* RESOLVED: The swizzle is applied after the DEPTH_TEXTURE_MODE. This
diff --git a/tests/spec/ext_transform_feedback/builtin-varyings.c b/tests/spec/ext_transform_feedback/builtin-varyings.c
index 29d84fe96..aeee87057 100644
--- a/tests/spec/ext_transform_feedback/builtin-varyings.c
+++ b/tests/spec/ext_transform_feedback/builtin-varyings.c
@@ -433,6 +433,32 @@ struct test_desc {
GL_FLOAT, /* expected_type */
1, /* expected_size */
},
+ {
+ "gl_CullDistance", /* name */
+ 130, /* version */
+
+ "#version 130\n" /* vs */
+ "#extension GL_ARB_cull_distance : enable\n" /* vs */
+ "in vec4 vertex_pos;\n"
+ "in float vertex_num;\n"
+ "out float gl_CullDistance[8];\n"
+ "void main() {\n"
+ " gl_Position = vertex_pos;\n"
+ " float scale = 1.0/256.0;\n"
+ " for(int i = 0; i < 8; ++i)\n"
+ " gl_CullDistance[i] = (float(i) + 8.0 * vertex_num) * scale;\n"
+ "}\n",
+
+ 8, /* num_varyings */
+ {"gl_CullDistance[0]", "gl_CullDistance[1]", /* varyings */
+ "gl_CullDistance[2]", "gl_CullDistance[3]",
+ "gl_CullDistance[4]", "gl_CullDistance[5]",
+ "gl_CullDistance[6]", "gl_CullDistance[7]"},
+
+ 8, /* expected_num_output_components */
+ GL_FLOAT, /* expected_type */
+ 1, /* expected_size */
+ },
};
const struct test_desc *test_to_run;
@@ -480,6 +506,9 @@ piglit_init(int argc, char **argv)
/* Set up test */
piglit_require_vertex_shader();
piglit_require_GLSL_version(test_to_run->version);
+ if (strcmp("gl_CullDistance", test_to_run->name) == 0) {
+ piglit_require_extension("GL_ARB_cull_distance");
+ }
piglit_require_transform_feedback();
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, test_to_run->vs);
prog = glCreateProgram();
diff --git a/tests/spec/ext_transform_feedback/discard-bitmap.c b/tests/spec/ext_transform_feedback/discard-bitmap.c
index 0f5db5018..428c87e06 100644
--- a/tests/spec/ext_transform_feedback/discard-bitmap.c
+++ b/tests/spec/ext_transform_feedback/discard-bitmap.c
@@ -32,7 +32,7 @@
*
* "Primitives can be optionally discarded before rasterization by
* calling Enable and Disable with RASTERIZER_DISCARD_EXT. When
- * enabled, primitives are discared right before the
+ * enabled, primitives are discarded right before the
* rasterization stage, but after the optional transform feedback
* stage. When disabled, primitives are passed through to the
* rasterization stage to be processed
diff --git a/tests/spec/ext_transform_feedback/discard-clear.c b/tests/spec/ext_transform_feedback/discard-clear.c
index d67aad5f2..9db26a9d5 100644
--- a/tests/spec/ext_transform_feedback/discard-clear.c
+++ b/tests/spec/ext_transform_feedback/discard-clear.c
@@ -32,7 +32,7 @@
*
* "Primitives can be optionally discarded before rasterization by
* calling Enable and Disable with RASTERIZER_DISCARD_EXT. When
- * enabled, primitives are discared right before the
+ * enabled, primitives are discarded right before the
* rasterization stage, but after the optional transform feedback
* stage. When disabled, primitives are passed through to the
* rasterization stage to be processed
diff --git a/tests/spec/ext_transform_feedback/discard-copypixels.c b/tests/spec/ext_transform_feedback/discard-copypixels.c
index cfd796b4e..b3c2f5fe9 100644
--- a/tests/spec/ext_transform_feedback/discard-copypixels.c
+++ b/tests/spec/ext_transform_feedback/discard-copypixels.c
@@ -32,7 +32,7 @@
*
* "Primitives can be optionally discarded before rasterization by
* calling Enable and Disable with RASTERIZER_DISCARD_EXT. When
- * enabled, primitives are discared right before the
+ * enabled, primitives are discarded right before the
* rasterization stage, but after the optional transform feedback
* stage. When disabled, primitives are passed through to the
* rasterization stage to be processed
diff --git a/tests/spec/ext_transform_feedback/discard-drawarrays.c b/tests/spec/ext_transform_feedback/discard-drawarrays.c
index ec47dd03d..f32807b72 100644
--- a/tests/spec/ext_transform_feedback/discard-drawarrays.c
+++ b/tests/spec/ext_transform_feedback/discard-drawarrays.c
@@ -33,7 +33,7 @@
*
* "Primitives can be optionally discarded before rasterization by
* calling Enable and Disable with RASTERIZER_DISCARD_EXT. When
- * enabled, primitives are discared right before the
+ * enabled, primitives are discarded right before the
* rasterization stage, but after the optional transform feedback
* stage. When disabled, primitives are passed through to the
* rasterization stage to be processed
diff --git a/tests/spec/ext_transform_feedback/discard-drawpixels.c b/tests/spec/ext_transform_feedback/discard-drawpixels.c
index a7958c9e4..94a643412 100644
--- a/tests/spec/ext_transform_feedback/discard-drawpixels.c
+++ b/tests/spec/ext_transform_feedback/discard-drawpixels.c
@@ -32,7 +32,7 @@
*
* "Primitives can be optionally discarded before rasterization by
* calling Enable and Disable with RASTERIZER_DISCARD_EXT. When
- * enabled, primitives are discared right before the
+ * enabled, primitives are discarded right before the
* rasterization stage, but after the optional transform feedback
* stage. When disabled, primitives are passed through to the
* rasterization stage to be processed
diff --git a/tests/spec/ext_transform_feedback/negative-prims.c b/tests/spec/ext_transform_feedback/negative-prims.c
index 7716f61d4..c5b6a5319 100644
--- a/tests/spec/ext_transform_feedback/negative-prims.c
+++ b/tests/spec/ext_transform_feedback/negative-prims.c
@@ -88,7 +88,7 @@ test_one_prim(GLenum tf_prim, int i)
}
} else {
if (error != 0) {
- printf("Unxpected GL error 0x%x when "
+ printf("Unexpected GL error 0x%x when "
"rendering %s during %s transform feedback\n",
error,
prim_name, tf_name);
diff --git a/tests/spec/ext_transform_feedback/order.c b/tests/spec/ext_transform_feedback/order.c
index 62f83b212..647c9b111 100644
--- a/tests/spec/ext_transform_feedback/order.c
+++ b/tests/spec/ext_transform_feedback/order.c
@@ -38,7 +38,7 @@
* correct order by using a vertex shader whose execution time is
* dramatically different for different vertices.
*
- * The test requries two command line arguments:
+ * The test requires two command line arguments:
*
* - drawcall indicates which drawing function should be called. A
* value of "arrays" causes DrawArrays() to be used. A value of
diff --git a/tests/spec/ext_transform_feedback/structs.c b/tests/spec/ext_transform_feedback/structs.c
index d67c3f307..d6a175abf 100644
--- a/tests/spec/ext_transform_feedback/structs.c
+++ b/tests/spec/ext_transform_feedback/structs.c
@@ -38,7 +38,7 @@
* passed to glTransformFeedbackVaryings().
*
* - The intention is for the transform feedback API to behave
- * similary to glGetUniformLocation() and
+ * similarly to glGetUniformLocation() and
* glGetProgramResourceLocation().
*
* This test verifies proper operation of transform feedback varyings
diff --git a/tests/spec/ext_transform_feedback/tessellation.c b/tests/spec/ext_transform_feedback/tessellation.c
index 7200ef917..43af5ef39 100644
--- a/tests/spec/ext_transform_feedback/tessellation.c
+++ b/tests/spec/ext_transform_feedback/tessellation.c
@@ -62,7 +62,7 @@
*
* The images are rendered using a fragment shader that attenuates the
* color of back-facing primitives, so that the test will verify that
- * tesellation preserves winding order properly.
+ * tessellation preserves winding order properly.
*
* The test can be run in four different coloring modes:
*
@@ -432,7 +432,7 @@ draw(GLuint prog, bool use_xfb, float y_offset, GLenum mode,
if (use_xfb) {
glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, xfb_buf);
/* Initialize the buffer with 0 so that we will be
- * able to identify membory that was not overwitten by
+ * able to identify membory that was not overwritten by
* the transform feedback.
*/
memset(buffer, 0, sizeof(buffer));
diff --git a/tests/spec/gl-1.0/logicop.c b/tests/spec/gl-1.0/logicop.c
index 85587596f..8bf927a44 100644
--- a/tests/spec/gl-1.0/logicop.c
+++ b/tests/spec/gl-1.0/logicop.c
@@ -53,7 +53,7 @@ struct test_data {
bool msaa;
};
-static struct test_data datas[] = {
+static struct test_data data[] = {
{ GL_CLEAR, false },
{ GL_SET, false },
{ GL_COPY, false },
@@ -88,20 +88,20 @@ static struct test_data datas[] = {
{ GL_OR_INVERTED, true },
};
-static struct piglit_subtest tests[ARRAY_SIZE(datas) + 1];
+static struct piglit_subtest tests[ARRAY_SIZE(data) + 1];
PIGLIT_GL_TEST_CONFIG_BEGIN
piglit_config = &config;
- for (int i = 0; i < ARRAY_SIZE(datas); i++) {
+ for (int i = 0; i < ARRAY_SIZE(data); i++) {
char *name;
- asprintf(&name, "%s%s", piglit_get_gl_enum_name(datas[i].mode),
- datas[i].msaa ? "_MSAA" : "");
+ asprintf(&name, "%s%s", piglit_get_gl_enum_name(data[i].mode),
+ data[i].msaa ? "_MSAA" : "");
tests[i].name = name;
tests[i].option = name;
tests[i].subtest_func = test_logicop;
- tests[i].data = &datas[i];
+ tests[i].data = &data[i];
}
config.subtests = tests;
diff --git a/tests/spec/gl-1.0/no-op-paths.c b/tests/spec/gl-1.0/no-op-paths.c
index 7c86b7c30..257a696ed 100644
--- a/tests/spec/gl-1.0/no-op-paths.c
+++ b/tests/spec/gl-1.0/no-op-paths.c
@@ -30,7 +30,7 @@
*
*
* Based on the original Glean tpaths.cpp test, this test verifies
- * that basic, trival OpenGL paths work as expected. For example,
+ * that basic, trivial OpenGL paths work as expected. For example,
* glAlphaFunc(GL_GEQUAL, 0.0) should always pass and
* glAlphaFunc(GL_LESS, 0.0) should always fail. We setup trivial
* pass and fail conditions for each of alpha test, blending, color mask,
diff --git a/tests/spec/gl-1.0/rendermode-feedback.c b/tests/spec/gl-1.0/rendermode-feedback.c
index 0f64881f2..1515b2bea 100644
--- a/tests/spec/gl-1.0/rendermode-feedback.c
+++ b/tests/spec/gl-1.0/rendermode-feedback.c
@@ -122,7 +122,7 @@ report_failure(struct type *type, float *buffer, int count)
{
int i;
- fprintf(stderr, "Feeback failed for %s:\n",
+ fprintf(stderr, "Feedback failed for %s:\n",
piglit_get_gl_enum_name(type->type));
fprintf(stderr, " Expected: Observed: (%d/%d)\n",
diff --git a/tests/spec/gl-1.1/drawarrays-vertex-count.c b/tests/spec/gl-1.1/drawarrays-vertex-count.c
index f307bcdd7..49cf8c437 100644
--- a/tests/spec/gl-1.1/drawarrays-vertex-count.c
+++ b/tests/spec/gl-1.1/drawarrays-vertex-count.c
@@ -92,7 +92,7 @@ probe_line_rect(int x1, int y1, int x2, int y2)
black));
}
-/* Sets a range of the color array to a spefific color. */
+/* Sets a range of the color array to a specific color. */
static void
set_colors(float *colors, unsigned int start, unsigned int count,
const float *color)
diff --git a/tests/spec/gl-2.0/glsl-link-empty-prog.c b/tests/spec/gl-2.0/glsl-link-empty-prog.c
index 6e57a4345..5cd15b3c7 100644
--- a/tests/spec/gl-2.0/glsl-link-empty-prog.c
+++ b/tests/spec/gl-2.0/glsl-link-empty-prog.c
@@ -25,7 +25,7 @@
*
* Verify behavior when a program object with no shaders attached is used.
* Neither the OpenGL spec nor the GLSL spec are explicit about what happens
- * in this case. However, the correct behavior can be infered from a few bits
+ * in this case. However, the correct behavior can be inferred from a few bits
* in the spec. Section 2.15 of the GL 2.1 spec says:
*
* "When the program object currently in use includes a vertex shader, its
diff --git a/tests/spec/gl-2.0/large-point-fs.c b/tests/spec/gl-2.0/large-point-fs.c
index 27e9c55ab..8903645a3 100644
--- a/tests/spec/gl-2.0/large-point-fs.c
+++ b/tests/spec/gl-2.0/large-point-fs.c
@@ -94,7 +94,7 @@ piglit_display(void)
}
size = MIN2(30, size);
- probeSize = size - 2; /* to accomodate small rasterization errors */
+ probeSize = size - 2; /* to accommodate small rasterization errors */
glUniform4fv(color_scale_uniform, 1, scale);
glUniform4fv(color_bias_uniform, 1, bias);
diff --git a/tests/spec/gl-2.1/pbo.c b/tests/spec/gl-2.1/pbo.c
index 59792cc5f..53be162ff 100644
--- a/tests/spec/gl-2.1/pbo.c
+++ b/tests/spec/gl-2.1/pbo.c
@@ -1071,7 +1071,7 @@ piglit_display(void)
{ "test_tex_sub_image", "", test_tex_sub_image, NULL },
{ "test_polygon_stip", "", test_polygon_stip, NULL },
{ "test_error_handling", "", test_error_handling, NULL },
- { NULL, NULL, NULL, NULL } /* End of list sentinal */
+ { NULL, NULL, NULL, NULL } /* End of list sentinel */
};
result = piglit_run_selected_subtests(funcs, NULL, 0, result);
diff --git a/tests/spec/gl-3.0/api/bindfragdata-link-error.c b/tests/spec/gl-3.0/api/bindfragdata-link-error.c
index 63dbbf237..172b05867 100644
--- a/tests/spec/gl-3.0/api/bindfragdata-link-error.c
+++ b/tests/spec/gl-3.0/api/bindfragdata-link-error.c
@@ -104,7 +104,7 @@ void piglit_init(int argc, char **argv)
/* Page 237 (page 253 of the PDF) of the OpenGL 3.0 spec says:
*
* "LinkProgram will fail if the assigned binding of a varying out
- * variable would cause the GL to reference a non-existant
+ * variable would cause the GL to reference a non-existent
* fragment color number (one greater than or equal to MAX DRAW
* BUFFERS)."
*
@@ -140,7 +140,7 @@ void piglit_init(int argc, char **argv)
* variable is bound to the same number. This type of aliasing is
* not allowed."
*
- * Try this by assiging 'a[0]' and 'v' to the same slot, and also try
+ * Try this by assigning 'a[0]' and 'v' to the same slot, and also try
* assigning 'a[1]' and 'v' to the same slot.
*
* This should not generate a GL error. It should only cause linking
diff --git a/tests/spec/gl-3.2/adj-prims.c b/tests/spec/gl-3.2/adj-prims.c
index b8c653425..ddeb09f6f 100644
--- a/tests/spec/gl-3.2/adj-prims.c
+++ b/tests/spec/gl-3.2/adj-prims.c
@@ -611,7 +611,7 @@ draw_lines_adj(GLuint vao, unsigned n)
provoking_vertex, 1 + i/4);
set_color(gray);
- // draw preceeding "wing" line
+ // draw preceding "wing" line
glDrawArrays(GL_LINES, i, 2);
// draw trailing "wing" line
glDrawArrays(GL_LINES, i+2, 2);
diff --git a/tests/spec/gl-3.2/layered-rendering/blit.c b/tests/spec/gl-3.2/layered-rendering/blit.c
index db171243c..bde65d497 100644
--- a/tests/spec/gl-3.2/layered-rendering/blit.c
+++ b/tests/spec/gl-3.2/layered-rendering/blit.c
@@ -251,7 +251,7 @@ testFramebufferBlitLayered(int x, int y, bool srcLayered, bool dstLayered)
return false;
}
- /* Check for if any errors have occured */
+ /* Check for if any errors have occurred */
if (!piglit_check_gl_error(GL_NO_ERROR)) {
printf("Error setting up framebuffers for test.\n");
return false;
@@ -286,7 +286,7 @@ testFramebufferBlitLayered(int x, int y, bool srcLayered, bool dstLayered)
glDeleteTextures(1, &srcTex);
glDeleteTextures(1, &dstTex);
- /* Check for if any errors have occured */
+ /* Check for if any errors have occurred */
if (!piglit_check_gl_error(GL_NO_ERROR)) {
printf("Error setting up framebuffers for test.\n");
return false;
@@ -324,7 +324,7 @@ piglit_display(void)
pass = testFramebufferBlitLayered(2 * texWidth, texDepth * texHeight,
false, false) && pass;
- /* Check for if any errors have occured */
+ /* Check for if any errors have occurred */
pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
piglit_present_results();
diff --git a/tests/spec/gl-3.2/layered-rendering/clear-color.c b/tests/spec/gl-3.2/layered-rendering/clear-color.c
index 32572b09c..0071aa5c6 100644
--- a/tests/spec/gl-3.2/layered-rendering/clear-color.c
+++ b/tests/spec/gl-3.2/layered-rendering/clear-color.c
@@ -166,7 +166,7 @@ piglit_display(void)
bool pass = true;
const float clearColor[3] = { 1, 1, 0 };
- /* Clear Defualt Framebuffer */
+ /* Clear Default Framebuffer */
glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
glClearColor(1,1,0,1);
glClear(GL_COLOR_BUFFER_BIT);
diff --git a/tests/spec/gl-3.2/layered-rendering/clear-depth.c b/tests/spec/gl-3.2/layered-rendering/clear-depth.c
index b58fccec9..9f509656b 100644
--- a/tests/spec/gl-3.2/layered-rendering/clear-depth.c
+++ b/tests/spec/gl-3.2/layered-rendering/clear-depth.c
@@ -180,7 +180,7 @@ piglit_init(int argc, char **argv)
if(!probe_texture_layered_depth(texture[0], 0, 0, 0, 10,
10, 4, expected)) {
- printf("Incorrect depth values recieved with glClear()\n");
+ printf("Incorrect depth values received with glClear()\n");
pass = false;
}
@@ -190,7 +190,7 @@ piglit_init(int argc, char **argv)
if(!probe_texture_layered_depth(texture[1], 0, 0, 0, 10,
10, 4, expected)) {
- printf("Incorrect depth values recieved with glClearBuffer()\n");
+ printf("Incorrect depth values received with glClearBuffer()\n");
pass = false;
}
diff --git a/tests/spec/gl-3.2/layered-rendering/framebuffertexture-defaults.c b/tests/spec/gl-3.2/layered-rendering/framebuffertexture-defaults.c
index 4c9e47b77..486ef8ce3 100644
--- a/tests/spec/gl-3.2/layered-rendering/framebuffertexture-defaults.c
+++ b/tests/spec/gl-3.2/layered-rendering/framebuffertexture-defaults.c
@@ -77,7 +77,7 @@ check_texture_parameters(GLenum objType, int objName, int level, int layer, int
}
if(!piglit_check_gl_error(GL_NO_ERROR)) {
- printf("Error has occured in check_texture_parameters()\n");
+ printf("Error has occurred in check_texture_parameters()\n");
return false;
}
@@ -119,7 +119,7 @@ check_texture_parameters(GLenum objType, int objName, int level, int layer, int
}
if(!piglit_check_gl_error(GL_NO_ERROR)) {
- printf("Error has occured in check_texture_parameters()\n");
+ printf("Error has occurred in check_texture_parameters()\n");
return false;
}
}
diff --git a/tests/spec/gl-3.2/layered-rendering/gl-layer-cube-map.c b/tests/spec/gl-3.2/layered-rendering/gl-layer-cube-map.c
index bd3134a67..12c25c77d 100644
--- a/tests/spec/gl-3.2/layered-rendering/gl-layer-cube-map.c
+++ b/tests/spec/gl-3.2/layered-rendering/gl-layer-cube-map.c
@@ -140,7 +140,7 @@ piglit_init(int argc, char **argv)
/* Check for errors during setup */
if(!check_framebuffer_status(GL_FRAMEBUFFER, GL_FRAMEBUFFER_COMPLETE) ||
!piglit_check_gl_error(GL_NO_ERROR)) {
- printf("Error occured during setup.\n");
+ printf("Error occurred during setup.\n");
piglit_report_result(PIGLIT_FAIL);
}
@@ -165,7 +165,7 @@ piglit_init(int argc, char **argv)
if(!check_framebuffer_status(GL_FRAMEBUFFER,
GL_FRAMEBUFFER_COMPLETE)) {
- printf("Error occured while probing texture\n");
+ printf("Error occurred while probing texture\n");
piglit_report_result(PIGLIT_FAIL);
}
diff --git a/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c b/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c
index 10c9eb907..0151042bb 100644
--- a/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c
+++ b/tests/spec/gl-4.5/compare-framebuffer-parameter-with-get.c
@@ -211,7 +211,7 @@ get_framebuffer_name(int index)
}
/*
- * Gets a framebuffer and attachs to it renderbuffer and other stuff,
+ * Gets a framebuffer and attaches to it renderbuffer and other stuff,
* in order to ensure that it is a complete framebuffer.
*
* returns if it was successful.
diff --git a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.frag b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.frag
index 5d61434c2..7560afcc5 100644
--- a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.frag
+++ b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.10
// [end config]
//
-// Compilation should fail becuase the type 'B' is unknown.
+// Compilation should fail because the type 'B' is unknown.
//
// Reproduces Mesa bugzilla #33313.
diff --git a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.vert b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.vert
index b17d381e3..563dff269 100644
--- a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.vert
+++ b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-global.vert
@@ -3,7 +3,7 @@
// glsl_version: 1.10
// [end config]
//
-// Compilation should fail becuase the type 'B' is unknown.
+// Compilation should fail because the type 'B' is unknown.
//
// Reproduces Mesa bugzilla #33313.
diff --git a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.frag b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.frag
index 4014880dc..086b98b02 100644
--- a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.frag
+++ b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.10
// [end config]
//
-// Compilation should fail becuase the type 'B' is unknown.
+// Compilation should fail because the type 'B' is unknown.
//
// Reproduces Mesa bugzilla #33313.
diff --git a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.vert b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.vert
index 1c1148b21..cfdd56661 100644
--- a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.vert
+++ b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-parameter.vert
@@ -3,7 +3,7 @@
// glsl_version: 1.10
// [end config]
//
-// Compilation should fail becuase the type 'B' is unknown.
+// Compilation should fail because the type 'B' is unknown.
//
// Reproduces Mesa bugzilla #33313.
diff --git a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.frag b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.frag
index 4eb111986..b5c681e99 100644
--- a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.frag
+++ b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.10
// [end config]
//
-// Compilation should fail becuase the type 'B' is unknown.
+// Compilation should fail because the type 'B' is unknown.
//
// Reproduces Mesa bugzilla #33313.
diff --git a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.vert b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.vert
index effec473b..a6fd78d92 100644
--- a/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.vert
+++ b/tests/spec/glsl-1.10/compiler/declarations/bad-array-type-struct-member.vert
@@ -3,7 +3,7 @@
// glsl_version: 1.10
// [end config]
//
-// Compilation should fail becuase the type 'B' is unknown.
+// Compilation should fail because the type 'B' is unknown.
//
// Reproduces Mesa bugzilla #33313.
diff --git a/tests/spec/glsl-1.10/execution/built-in-matrix-state.c b/tests/spec/glsl-1.10/execution/built-in-matrix-state.c
index 83d9b0622..ba5c2a839 100644
--- a/tests/spec/glsl-1.10/execution/built-in-matrix-state.c
+++ b/tests/spec/glsl-1.10/execution/built-in-matrix-state.c
@@ -24,7 +24,7 @@
/**
* @file built-in-matrix-state.c: Access uniform matrix derived state in GLSL
*
- * Set coordiante transformation matrices with the OpenGL API and access them
+ * Set coordinate transformation matrices with the OpenGL API and access them
* and their derived uniforms in a GLSL shader.
*/
diff --git a/tests/spec/glsl-1.10/execution/copy-propagation/glsl-copy-propagation-loop-2.shader_test b/tests/spec/glsl-1.10/execution/copy-propagation/glsl-copy-propagation-loop-2.shader_test
index cf63d2e2a..6e01e97dd 100644
--- a/tests/spec/glsl-1.10/execution/copy-propagation/glsl-copy-propagation-loop-2.shader_test
+++ b/tests/spec/glsl-1.10/execution/copy-propagation/glsl-copy-propagation-loop-2.shader_test
@@ -11,7 +11,7 @@ void main()
}
[fragment shader]
-/* Tests for what was a crasher bug in glsl_copy_propagation_elements */
+/* Tests for what was a crash bug in glsl_copy_propagation_elements */
varying vec4 color;
void main()
diff --git a/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test b/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test
index 1f02e2f95..280ef77fc 100644
--- a/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test
+++ b/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test
@@ -17,7 +17,7 @@ void main(void)
uniform int a;
vec4 getColour() {
- /* We use a uniform in the outer loop comparision so it's not immediately
+ /* We use a uniform in the outer loop comparison so it's not immediately
* unrolled.
*/
for(int v124 = 0; v124 != a; v124++) {
diff --git a/tests/spec/glsl-1.10/execution/fs-nested-return-in-loop-nested_in_if.shader_test b/tests/spec/glsl-1.10/execution/fs-nested-return-in-loop-nested_in_if.shader_test
index 5486ca9f4..0718650df 100644
--- a/tests/spec/glsl-1.10/execution/fs-nested-return-in-loop-nested_in_if.shader_test
+++ b/tests/spec/glsl-1.10/execution/fs-nested-return-in-loop-nested_in_if.shader_test
@@ -1,4 +1,4 @@
-# Test return lowering when nested in a loop thats nested in an if.
+# Test return lowering when nested in a loop that's nested in an if.
#
# Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100303
[require]
diff --git a/tests/spec/glsl-1.10/execution/fs-texture-select.shader_test b/tests/spec/glsl-1.10/execution/fs-texture-select.shader_test
index bedd36586..a0ad4dc2d 100644
--- a/tests/spec/glsl-1.10/execution/fs-texture-select.shader_test
+++ b/tests/spec/glsl-1.10/execution/fs-texture-select.shader_test
@@ -1,5 +1,5 @@
# Even columns fetch from tex0 (black), while odd columns fetch from tex1 (white).
-# The shader inverts the color of even collumns to get make them white,
+# The shader inverts the color of even columns to get make them white,
# so the final image should be completely white.
#
# At the moment, radeonsi miscompiles this shader and only fetches from tex0
diff --git a/tests/spec/glsl-1.10/execution/glsl-override-builtin-2.shader_test b/tests/spec/glsl-1.10/execution/glsl-override-builtin-2.shader_test
index 2a8001ad0..97a4bbdac 100644
--- a/tests/spec/glsl-1.10/execution/glsl-override-builtin-2.shader_test
+++ b/tests/spec/glsl-1.10/execution/glsl-override-builtin-2.shader_test
@@ -1,7 +1,7 @@
[require]
GLSL >= 1.10
-/* built-in function could be overriden, but should not impact
+/* built-in function could be overridden, but should not impact
another shader.
*/
diff --git a/tests/spec/glsl-1.10/execution/vs-loop-complex-with-else-break.shader_test b/tests/spec/glsl-1.10/execution/vs-loop-complex-with-else-break.shader_test
index 43430071b..ca056a388 100644
--- a/tests/spec/glsl-1.10/execution/vs-loop-complex-with-else-break.shader_test
+++ b/tests/spec/glsl-1.10/execution/vs-loop-complex-with-else-break.shader_test
@@ -1,4 +1,4 @@
-# This tests a bug in the r300 compiler where it was too aggresive
+# This tests a bug in the r300 compiler where it was too aggressive
# with optimizations (copy propagation) of movs in loops.
#
# See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6467
diff --git a/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test b/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test
index 38fdda4ca..d54f55efc 100644
--- a/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test
+++ b/tests/spec/glsl-1.10/execution/vs-loop-variable-iteration-limit-unroll4.shader_test
@@ -21,7 +21,7 @@ void main()
int x = 0;
/* Here we add a second && and put the known limit i < 4 in parentheses in
- * order to trigger a Mesa bug seen in a Assasins Creed Odyssey shader
+ * order to trigger a Mesa bug seen in a Assassins Creed Odyssey shader
*/
while (x < loop_count && (i < 4 && j < loop_count2)) {
if (x == 0 && i == 0)
diff --git a/tests/spec/glsl-1.10/preprocessor/bogus-extension-test.frag b/tests/spec/glsl-1.10/preprocessor/bogus-extension-test.frag
index b4fce4573..3cfe245a3 100644
--- a/tests/spec/glsl-1.10/preprocessor/bogus-extension-test.frag
+++ b/tests/spec/glsl-1.10/preprocessor/bogus-extension-test.frag
@@ -4,7 +4,7 @@
* [end config]
*/
-// Test using a non-existant function. Should not compile.
+// Test using a non-existent function. Should not compile.
#extension GL_FOO_bar: require
void main()
{
diff --git a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
index 8f3d42f4c..c072f49fa 100644
--- a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
+++ b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence-in-parenthesis.vert
@@ -3,7 +3,7 @@
* glsl_version: 1.20
* [end config]
*
- * The body of the GLSL spec is slient on this issue, but the grammar says:
+ * The body of the GLSL spec is silent on this issue, but the grammar says:
*
* expression:
* assignment_expression
diff --git a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence.vert b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence.vert
index 9d7e21442..0638084e8 100644
--- a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence.vert
+++ b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-size-sequence.vert
@@ -3,7 +3,7 @@
* glsl_version: 1.20
* [end config]
*
- * The body of the GLSL spec is slient on this issue, but the grammar says:
+ * The body of the GLSL spec is silent on this issue, but the grammar says:
*
* expression:
* assignment_expression
diff --git a/tests/spec/glsl-1.20/execution/clipping/fixed-clip-enables.shader_test b/tests/spec/glsl-1.20/execution/clipping/fixed-clip-enables.shader_test
index 93995a5c1..b9740616a 100644
--- a/tests/spec/glsl-1.20/execution/clipping/fixed-clip-enables.shader_test
+++ b/tests/spec/glsl-1.20/execution/clipping/fixed-clip-enables.shader_test
@@ -8,7 +8,7 @@
#
# To verify that each enable works, the combinations of enables were
# chosen such that:
-# - Every plane is enabled at least once and disbled at least once.
+# - Every plane is enabled at least once and disabled at least once.
# - Every plane is enabled and disabled in a different pattern.
#
# Note: Some implementations have bugs related to improper coordinate
diff --git a/tests/spec/glsl-1.20/execution/clipping/vs-clip-vertex-enables.shader_test b/tests/spec/glsl-1.20/execution/clipping/vs-clip-vertex-enables.shader_test
index b93d16f34..ca645b67b 100644
--- a/tests/spec/glsl-1.20/execution/clipping/vs-clip-vertex-enables.shader_test
+++ b/tests/spec/glsl-1.20/execution/clipping/vs-clip-vertex-enables.shader_test
@@ -5,7 +5,7 @@
#
# To verify that each enable works, the combinations of enables were
# chosen such that:
-# - Every plane is enabled at least once and disbled at least once.
+# - Every plane is enabled at least once and disabled at least once.
# - Every plane is enabled and disabled in a different pattern.
#
# Note: Some implementations have bugs related to improper coordinate
diff --git a/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test
index c7d0e3a54..5ff0626b8 100644
--- a/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test
+++ b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test
@@ -15,7 +15,7 @@ void main()
struct Foo {
int value;
- /* A second member of a differnt size helps ensures we calculate member
+ /* A second member of a different size helps ensures we calculate member
* offsets correctly.
*/
ivec2 value2;
diff --git a/tests/spec/glsl-1.20/recursion/recursion.c b/tests/spec/glsl-1.20/recursion/recursion.c
index 7c3c4dc32..214f565ab 100644
--- a/tests/spec/glsl-1.20/recursion/recursion.c
+++ b/tests/spec/glsl-1.20/recursion/recursion.c
@@ -31,7 +31,7 @@
* present if the static function call graph of the program contains
* cycles."
*
- * This langauge leaves a lot of questions unanswered.
+ * This language leaves a lot of questions unanswered.
*
* - Is the error generated at compile-time or link-time?
*
diff --git a/tests/spec/glsl-1.30/compiler/interpolation-qualifiers/local-smooth-01.frag b/tests/spec/glsl-1.30/compiler/interpolation-qualifiers/local-smooth-01.frag
index 12cf0add7..84a33f397 100644
--- a/tests/spec/glsl-1.30/compiler/interpolation-qualifiers/local-smooth-01.frag
+++ b/tests/spec/glsl-1.30/compiler/interpolation-qualifiers/local-smooth-01.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.30
// [end config]
//
-// Attempt to declare a local varaible with 'smooth'.
+// Attempt to declare a local variable with 'smooth'.
#version 130
diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/function-param-centroid-in-01.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/function-param-centroid-in-01.frag
index 7bbab7a68..236d8be25 100644
--- a/tests/spec/glsl-1.30/compiler/storage-qualifiers/function-param-centroid-in-01.frag
+++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/function-param-centroid-in-01.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.30
// [end config]
//
-// Check that 'centroid in' cannot be used a parameter qualifer.
+// Check that 'centroid in' cannot be used a parameter qualifier.
#version 130
diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-centroid-in-01.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-centroid-in-01.frag
index b860cdd47..7bb2c3a5b 100644
--- a/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-centroid-in-01.frag
+++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-centroid-in-01.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.30
// [end config]
//
-// Check that 'centroid in' cannot be used a local variable qualifer.
+// Check that 'centroid in' cannot be used a local variable qualifier.
#version 130
diff --git a/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-in-01.frag b/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-in-01.frag
index 74c82ef4a..24a0a8679 100644
--- a/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-in-01.frag
+++ b/tests/spec/glsl-1.30/compiler/storage-qualifiers/local-in-01.frag
@@ -3,7 +3,7 @@
// glsl_version: 1.30
// [end config]
//
-// Declare a local varaible with 'in'.
+// Declare a local variable with 'in'.
//
// From section 4.3.4 of the GLSL 1.30 spec:
// Input variables must be declared at global scope.
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-all-planes-enabled.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-all-planes-enabled.shader_test
index 37a8216f8..3a9abcc1f 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-all-planes-enabled.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-all-planes-enabled.shader_test
@@ -16,7 +16,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-bulk-assign.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-bulk-assign.shader_test
index 7c921d5bc..542bf6dad 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-bulk-assign.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-bulk-assign.shader_test
@@ -28,7 +28,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-enables.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-enables.shader_test
index 2cb0105b1..c6e63e8af 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-enables.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-enables.shader_test
@@ -11,7 +11,7 @@
#
# To verify that each enable works, the combinations of enables were
# chosen such that:
-# - Every plane is enabled at least once and disbled at least once.
+# - Every plane is enabled at least once and disabled at least once.
# - Every plane is enabled and disabled in a different pattern.
[require]
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test
index bbafc296a..561433f01 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test
@@ -37,7 +37,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-inout-param.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-inout-param.shader_test
index 075069db1..9be843fa4 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-inout-param.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-inout-param.shader_test
@@ -35,7 +35,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-out-param.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-out-param.shader_test
index fcc4737f0..07e623cad 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-out-param.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-out-param.shader_test
@@ -35,7 +35,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-retval.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-retval.shader_test
index 3dc8dc0c6..8aaf750ca 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-retval.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-retval.shader_test
@@ -55,7 +55,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-uint-index.shader_test b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-uint-index.shader_test
index 93f0fc2cc..b3da1f85f 100644
--- a/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-uint-index.shader_test
+++ b/tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-uint-index.shader_test
@@ -20,7 +20,7 @@ void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- // Compute 2D cordinates relative to a center point of (0.5,
+ // Compute 2D coordinates relative to a center point of (0.5,
// 0.5).
vec2 coord = gl_Vertex.xy - vec2(0.5, 0.5);
diff --git a/tests/spec/glsl-1.30/execution/range_analysis_fsat_of_nan.shader_test b/tests/spec/glsl-1.30/execution/range_analysis_fsat_of_nan.shader_test
index 56fbcb645..14de330ff 100644
--- a/tests/spec/glsl-1.30/execution/range_analysis_fsat_of_nan.shader_test
+++ b/tests/spec/glsl-1.30/execution/range_analysis_fsat_of_nan.shader_test
@@ -13,7 +13,7 @@ out vec4 piglit_fragcolor;
void main()
{
/* Create a value that, if it were a number, would have to be > 0. Due to
- * possilbe flush-to-zero semantics, pretty much anything involving
+ * possible flush-to-zero semantics, pretty much anything involving
* multiplication or division can be zero. However, gt_zero + ge_zero is
* gt_zero.
*/
diff --git a/tests/spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-enables.shader_test b/tests/spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-enables.shader_test
index d5ef9cd98..ba7e63712 100644
--- a/tests/spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-enables.shader_test
+++ b/tests/spec/glsl-1.50/execution/compatibility/clipping/gs-clip-vertex-enables.shader_test
@@ -5,7 +5,7 @@
#
# To verify that each enable works, the combinations of enables were
# chosen such that:
-# - Every plane is enabled at least once and disbled at least once.
+# - Every plane is enabled at least once and disabled at least once.
# - Every plane is enabled and disabled in a different pattern.
#
# Note: Some implementations have bugs related to improper coordinate
diff --git a/tests/spec/glsl-1.50/execution/compatibility/clipping/vs-gs-clip-vertex-enables.shader_test b/tests/spec/glsl-1.50/execution/compatibility/clipping/vs-gs-clip-vertex-enables.shader_test
index 4231e8b26..c427b4461 100644
--- a/tests/spec/glsl-1.50/execution/compatibility/clipping/vs-gs-clip-vertex-enables.shader_test
+++ b/tests/spec/glsl-1.50/execution/compatibility/clipping/vs-gs-clip-vertex-enables.shader_test
@@ -5,7 +5,7 @@
#
# To verify that each enable works, the combinations of enables were
# chosen such that:
-# - Every plane is enabled at least once and disbled at least once.
+# - Every plane is enabled at least once and disabled at least once.
# - Every plane is enabled and disabled in a different pattern.
#
# Note: Some implementations have bugs related to improper coordinate
diff --git a/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-matching-case-2.shader_test b/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-matching-case-2.shader_test
index f78ec3f15..250c025dc 100644
--- a/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-matching-case-2.shader_test
+++ b/tests/spec/glsl-1.50/execution/fragcoord-layout-qualifiers-matching-case-2.shader_test
@@ -18,7 +18,7 @@
*
*
* Tests the case when all the fragment shaders which use gl_FragCoord,
- * redeclare it with matching layout qualifiers. The specfic order of
+ * redeclare it with matching layout qualifiers. The specific order of
* attached fragment shaders is important here.
*/
[require]
diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp b/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp
index 6d71b9fe7..96585946e 100644
--- a/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp
+++ b/tests/spec/glsl-1.50/execution/geometry/gs-max-output.cpp
@@ -59,7 +59,7 @@ struct testcase {
unsigned num_instances; /* draw instances */
unsigned num_points; /* draw size / count */
unsigned num_invocations; /* GS invocations / instances */
- unsigned num_outputs; /* # vertex ouput per GS invocation */
+ unsigned num_outputs; /* # vertex output per GS invocation */
unsigned num_components; /* # extra components per GS output vertex */
diff --git a/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c b/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c
index 61bd73e81..a59f17b39 100644
--- a/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c
+++ b/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c
@@ -39,7 +39,7 @@
* restart to split it into a pair of 3-triangle strips (this ensures
* that triangles in the first strip have the same parity in relation
* to the strip as they have when measured by gl_PrimitiveIDIn;
- * triangles in the second strip hav opposite parity in relation to
+ * triangles in the second strip have opposite parity in relation to
* the strip from what they have when measured by gl_PrimitiveIDIn).
* The vertex IDs of all vertices are collected using transform
* feedback, and checked in C to make sure it matches the expected
diff --git a/tests/spec/glsl-1.50/execution/primitive-id-no-gs-line.shader_test b/tests/spec/glsl-1.50/execution/primitive-id-no-gs-line.shader_test
index b98880d7d..aa5b07f65 100644
--- a/tests/spec/glsl-1.50/execution/primitive-id-no-gs-line.shader_test
+++ b/tests/spec/glsl-1.50/execution/primitive-id-no-gs-line.shader_test
@@ -61,7 +61,7 @@ piglit_vertex/float/2
# shader will draw a different color for failing pixels, and "probe all" will
# detect the problem.
#
-# This won't catch cases where the test doesn't draw anything. Hopefullly
+# This won't catch cases where the test doesn't draw anything. Hopefully
# problems of that nature will have already been caught by other tests.
clear color 0.0 1.0 0.0 1.0
diff --git a/tests/spec/glsl-1.50/execution/primitive-id-no-gs-point.shader_test b/tests/spec/glsl-1.50/execution/primitive-id-no-gs-point.shader_test
index d5ce5de25..5c99d1f7b 100644
--- a/tests/spec/glsl-1.50/execution/primitive-id-no-gs-point.shader_test
+++ b/tests/spec/glsl-1.50/execution/primitive-id-no-gs-point.shader_test
@@ -61,7 +61,7 @@ piglit_vertex/float/2
# shader will draw a different color for failing pixels, and "probe all" will
# detect the problem.
#
-# This won't catch cases where the test doesn't draw anything. Hopefullly
+# This won't catch cases where the test doesn't draw anything. Hopefully
# problems of that nature will have already been caught by other tests.
clear color 0.0 1.0 0.0 1.0
diff --git a/tests/spec/glsl-1.50/execution/vs-input-arrays.c b/tests/spec/glsl-1.50/execution/vs-input-arrays.c
index d94d0c5f2..07a3b3ab1 100644
--- a/tests/spec/glsl-1.50/execution/vs-input-arrays.c
+++ b/tests/spec/glsl-1.50/execution/vs-input-arrays.c
@@ -40,7 +40,7 @@
* gl_VertexID). VS emits a float, 0 for pass, 1 for fail. This is done because
* bool cannot be sent as a varying, and using flat shading for sending an int
* results in additional vertex info being discarded. FS draws GREEN if it
- * received the expeced 0 from the VS, RED if !0.
+ * received the expected 0 from the VS, RED if !0.
*/
#include "piglit-util-gl.h"
diff --git a/tests/spec/glsl-1.50/execution/vs-named-block-no-modify.c b/tests/spec/glsl-1.50/execution/vs-named-block-no-modify.c
index ed3d21372..38737a251 100644
--- a/tests/spec/glsl-1.50/execution/vs-named-block-no-modify.c
+++ b/tests/spec/glsl-1.50/execution/vs-named-block-no-modify.c
@@ -25,7 +25,7 @@
/**
* \file named-block-no-modify.c
*
- * Test that uniform variables containted within a named uniform block cannot be
+ * Test that uniform variables contained within a named uniform block cannot be
* accessed by the glUniform* commands.
*
* Section 2.11.4 (Uniform Variables) of the GL 3.2 spec says:
diff --git a/tests/spec/glsl-es-1.00/execution/glsl-no-vertex-attribs.shader_test b/tests/spec/glsl-es-1.00/execution/glsl-no-vertex-attribs.shader_test
index 36a6b4c2a..ddcc48a3b 100644
--- a/tests/spec/glsl-es-1.00/execution/glsl-no-vertex-attribs.shader_test
+++ b/tests/spec/glsl-es-1.00/execution/glsl-no-vertex-attribs.shader_test
@@ -1,5 +1,5 @@
#
-# Tests that we can succesfully render a point with OpenGL ES 2.0
+# Tests that we can successfully render a point with OpenGL ES 2.0
# without having any vertex attributes enabled.
#
[require]
diff --git a/tests/spec/glx_arb_create_context/invalid-attribute.c b/tests/spec/glx_arb_create_context/invalid-attribute.c
index 4e1884c49..27e800402 100644
--- a/tests/spec/glx_arb_create_context/invalid-attribute.c
+++ b/tests/spec/glx_arb_create_context/invalid-attribute.c
@@ -43,7 +43,7 @@ static bool try_attribute(int attribute)
if (ctx != NULL) {
fprintf(stderr,
- "Created OpenGL context with invalud attribute "
+ "Created OpenGL context with invalid attribute "
"0x%08x, but this should have failed.\n",
attribute);
glXDestroyContext(dpy, ctx);
diff --git a/tests/spec/glx_arb_create_context/invalid-gl-version.c b/tests/spec/glx_arb_create_context/invalid-gl-version.c
index 12c253b2c..565fc9bef 100644
--- a/tests/spec/glx_arb_create_context/invalid-gl-version.c
+++ b/tests/spec/glx_arb_create_context/invalid-gl-version.c
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
/* Since the writing of the GLX_ARB_create_context_spec, versions 3.3,
* 4.0, 4.1, and 4.2 have been released. There is no expectation that
- * 3.4 will ever exist becuase it would have to include functionality
+ * 3.4 will ever exist because it would have to include functionality
* not in 4.0, and that would be weird.
*/
pass = try_version(3, 4) && pass;
diff --git a/tests/spec/glx_ext_import_context/query-context-info.c b/tests/spec/glx_ext_import_context/query-context-info.c
index 6e187a1fb..dbc1ce259 100644
--- a/tests/spec/glx_ext_import_context/query-context-info.c
+++ b/tests/spec/glx_ext_import_context/query-context-info.c
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
&& pass;
/* Create a second indirect-rendering context, and have it share the
- * first indirect-rendering context. The XID of the share conext for
+ * first indirect-rendering context. The XID of the share context for
* the original context should be unchanged.
*/
ctx = glXCreateContext(dpy, visinfo, indirectCtx, False);
diff --git a/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicCompSwap-float-NaN.shader_test b/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicCompSwap-float-NaN.shader_test
index 0ad13b742..6cdffdb2d 100644
--- a/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicCompSwap-float-NaN.shader_test
+++ b/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicCompSwap-float-NaN.shader_test
@@ -17,7 +17,7 @@ layout(binding = 0, std430) buffer bufblock {
#define POS_NAN(x) (0x7f800000u | (0x007fffffu & uint(x)))
#define NEG_NAN(x) (0xff800000u | (0x007fffffu & uint(x)))
-uniform uint comparitors[] = uint[](POS_NAN(0x00ffffff),
+uniform uint comparators[] = uint[](POS_NAN(0x00ffffff),
NEG_NAN(0x00ffffff),
POS_NAN(0x00555555),
NEG_NAN(0x00555555),
@@ -38,7 +38,7 @@ void main()
* element will forever be set to float(idx).
*/
atomicCompSwap(value[idx],
- uintBitsToFloat(comparitors[idx]),
+ uintBitsToFloat(comparators[idx]),
42.0);
color = value[idx] == 42.0
diff --git a/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMax-float-NaN.shader_test b/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMax-float-NaN.shader_test
index 527de10eb..5eda03ae4 100644
--- a/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMax-float-NaN.shader_test
+++ b/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMax-float-NaN.shader_test
@@ -85,21 +85,21 @@ void main()
uint idx = (y * width) + x;
- uint comparitor;
+ uint comparator;
uint j = y & 7u;
if (j <= 3u)
- comparitor = floatBitsToUint(float(idx));
+ comparator = floatBitsToUint(float(idx));
else if (j == 4u)
- comparitor = make_qnan(idx * 101701u, false);
+ comparator = make_qnan(idx * 101701u, false);
else if (j == 5u)
- comparitor = make_qnan(idx * 89137u, true);
+ comparator = make_qnan(idx * 89137u, true);
else if (j == 6u)
- comparitor = make_snan(idx * 2399u, false);
+ comparator = make_snan(idx * 2399u, false);
else
- comparitor = make_snan(idx * 337u, true);
+ comparator = make_snan(idx * 337u, true);
- float result = atomicMax(value[idx], uintBitsToFloat(comparitor));
+ float result = atomicMax(value[idx], uintBitsToFloat(comparator));
uint k = idx & 7u;
if (k <= 3u)
@@ -128,7 +128,7 @@ void main()
* does not explicitly state
* which.
*/
- if (is_snan(comparitor))
+ if (is_snan(comparator))
expect(is_snan(after));
else
expect(floatBitsToUint(after) == floatBitsToUint(result));
@@ -141,9 +141,9 @@ void main()
* does not explicitly state
* which.
*/
- if (is_snan(comparitor))
- expect(floatBitsToUint(after) == comparitor);
- else if (is_qnan(comparitor))
+ if (is_snan(comparator))
+ expect(floatBitsToUint(after) == comparator);
+ else if (is_qnan(comparator))
expect(is_qnan(after));
else
expect(after == float(idx));
@@ -153,9 +153,9 @@ void main()
* fmax(x, sNaN) => sNaN
* fmax(x, qNaN) => x
*/
- if (is_snan(comparitor))
- expect(floatBitsToUint(after) == comparitor);
- else if (is_qnan(comparitor))
+ if (is_snan(comparator))
+ expect(floatBitsToUint(after) == comparator);
+ else if (is_qnan(comparator))
expect(after == float(idx) - 0.5);
else
expect(after == float(idx));
diff --git a/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMin-float-NaN.shader_test b/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMin-float-NaN.shader_test
index f34753610..63249c489 100644
--- a/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMin-float-NaN.shader_test
+++ b/tests/spec/intel_shader_atomic_float_minmax/execution/ssbo-atomicMin-float-NaN.shader_test
@@ -85,21 +85,21 @@ void main()
uint idx = (y * width) + x;
- uint comparitor;
+ uint comparator;
uint j = y & 7u;
if (j <= 3u)
- comparitor = floatBitsToUint(float(idx));
+ comparator = floatBitsToUint(float(idx));
else if (j == 4u)
- comparitor = make_qnan(idx * 16871u, false);
+ comparator = make_qnan(idx * 16871u, false);
else if (j == 5u)
- comparitor = make_qnan(idx * 9929u, true);
+ comparator = make_qnan(idx * 9929u, true);
else if (j == 6u)
- comparitor = make_snan(idx * 8243u, false);
+ comparator = make_snan(idx * 8243u, false);
else
- comparitor = make_snan(idx * 4621u, true);
+ comparator = make_snan(idx * 4621u, true);
- float result = atomicMin(value[idx], uintBitsToFloat(comparitor));
+ float result = atomicMin(value[idx], uintBitsToFloat(comparator));
uint k = idx & 7u;
if (k <= 3u)
@@ -128,7 +128,7 @@ void main()
* does not explicitly state
* which.
*/
- if (is_snan(comparitor))
+ if (is_snan(comparator))
expect(is_snan(after));
else
expect(floatBitsToUint(after) == floatBitsToUint(result));
@@ -141,9 +141,9 @@ void main()
* does not explicitly state
* which.
*/
- if (is_snan(comparitor))
- expect(floatBitsToUint(after) == comparitor);
- else if (is_qnan(comparitor))
+ if (is_snan(comparator))
+ expect(floatBitsToUint(after) == comparator);
+ else if (is_qnan(comparator))
expect(is_qnan(after));
else
expect(after == float(idx));
@@ -153,9 +153,9 @@ void main()
* fmin(x, sNaN) => sNaN
* fmin(x, qNaN) => x
*/
- if (is_snan(comparitor))
- expect(floatBitsToUint(after) == comparitor);
- else if (is_qnan(comparitor))
+ if (is_snan(comparator))
+ expect(floatBitsToUint(after) == comparator);
+ else if (is_qnan(comparator))
expect(after == float(idx) + 0.5);
else
expect(after == float(idx));
diff --git a/tests/spec/khr_debug/debug-push-pop-group.c b/tests/spec/khr_debug/debug-push-pop-group.c
index d4c08cd09..1ac4ef48a 100644
--- a/tests/spec/khr_debug/debug-push-pop-group.c
+++ b/tests/spec/khr_debug/debug-push-pop-group.c
@@ -287,7 +287,7 @@ static bool test_push_pop_debug_group()
pass = false;
}
- /* double check that TestMessage3 didnt sneak into the log */
+ /* double check that TestMessage3 didn't sneak into the log */
nextMessage = 0;
for (i = 0; i < count; i++) {
if (strstr(messageLog+nextMessage, TestMessage3) != NULL) {
diff --git a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c
index 2fdfb28ca..a5d61ac3f 100644
--- a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c
+++ b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c
@@ -277,7 +277,7 @@ test_miptrees(void* input_type)
int block_dims;
if (is_srgb_test)
- /* Loosen up the tolerence for sRGB tests. This will allow testing
+ /* Loosen up the tolerance for sRGB tests. This will allow testing
* sRGB formats which have known precision issues in void extent
* blocks. See khronos bug#11294 for details.
*/
diff --git a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c
index 3926db785..d8f7caec7 100644
--- a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c
+++ b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c
@@ -266,7 +266,7 @@ test_miptrees(void* input_type)
"GL_KHR_texture_compression_astc_sliced_3d");
if (is_srgb_test)
- /* Loosen up the tolerence for sRGB tests. This will allow testing
+ /* Loosen up the tolerance for sRGB tests. This will allow testing
* sRGB formats which have known precision issues in void extent
* blocks. See khronos bug#11294 for details.
*/
diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c
index f80409a5d..6644dc9d7 100644
--- a/tests/spec/nv_conditional_render/begin-while-active.c
+++ b/tests/spec/nv_conditional_render/begin-while-active.c
@@ -36,7 +36,7 @@
* an <id> of zero, if the active query object name for <target>
* is non-zero, if <id> is the active query object name for any
* query type, or if <id> is the active query object for
- * condtional rendering (Section 2.X), the error INVALID
+ * conditional rendering (Section 2.X), the error INVALID
* OPERATION is generated."
*/
diff --git a/tests/spec/nv_copy_image/formats.c b/tests/spec/nv_copy_image/formats.c
index dbee0d9f4..351083c14 100644
--- a/tests/spec/nv_copy_image/formats.c
+++ b/tests/spec/nv_copy_image/formats.c
@@ -328,7 +328,7 @@ piglit_init(int argc, char **argv)
if (src_format_arg) {
/* Since we know the source format, we know the number of
- * bits per texel, so we can restrict the ammount of random
+ * bits per texel, so we can restrict the amount of random
* data we generate.
*/
Bpp = src_format_arg->bytes;
@@ -456,7 +456,7 @@ setup_test_data(const struct texture_format *src_format,
for (j = 0; j < samples; ++j) {
src_image = src_data + (j * image_size);
res_image = res_data + (j * image_size);
- /* Copy the center TEX_SIZE/2 x TEX_SIZE/2 pixels froms
+ /* Copy the center TEX_SIZE/2 x TEX_SIZE/2 pixels forms
* src_data to res_data
*/
memcpy_rect(src_image, stride, TEX_SIZE/4, TEX_SIZE/4,
diff --git a/tests/spec/nv_texture_env_combine4/combine.c b/tests/spec/nv_texture_env_combine4/combine.c
index 0f2fdbd0c..9a5c03fc7 100644
--- a/tests/spec/nv_texture_env_combine4/combine.c
+++ b/tests/spec/nv_texture_env_combine4/combine.c
@@ -27,7 +27,7 @@
/**
* @file combine.c: Test GL_NV_texture_env_combine4
- * Author: Brian Paul (brianp@valinux.com) Januar 2009
+ * Author: Brian Paul (brianp@valinux.com) January 2009
*
* Generate some random combiner state and colors, compute the expected
* color, then render with the combiner state and compare the results.
diff --git a/tests/spec/oes_texture_compression_astc/oes_compressed_astc-miptree-3d.c b/tests/spec/oes_texture_compression_astc/oes_compressed_astc-miptree-3d.c
index 84e661135..8b3750918 100644
--- a/tests/spec/oes_texture_compression_astc/oes_compressed_astc-miptree-3d.c
+++ b/tests/spec/oes_texture_compression_astc/oes_compressed_astc-miptree-3d.c
@@ -248,7 +248,7 @@ test_miptrees(void* input_type)
int block_dims = 0, slice;;
if (is_srgb_test)
- /* Loosen up the tolerence for sRGB tests. This will allow testing
+ /* Loosen up the tolerance for sRGB tests. This will allow testing
* sRGB formats which have known precision issues in void extent
* blocks. See khronos bug#11294 for details.
*/
diff --git a/tests/texturing/compressedteximage.c b/tests/texturing/compressedteximage.c
index 45ae695b2..47328634b 100644
--- a/tests/texturing/compressedteximage.c
+++ b/tests/texturing/compressedteximage.c
@@ -117,8 +117,9 @@ display_mipmaps(int x, int y)
int i;
glEnable(GL_TEXTURE_2D);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
piglit_draw_rect_tex(x, y, i, i,
0, 0, 1, 1);
diff --git a/tests/texturing/copyteximage.c b/tests/texturing/copyteximage.c
index 3e8d81e4a..b12e936f7 100644
--- a/tests/texturing/copyteximage.c
+++ b/tests/texturing/copyteximage.c
@@ -396,7 +396,7 @@ test_target_and_format(GLint x, GLint y, GLenum target, GLenum format,
}
/* To avoid failures not related to this test case,
- * loosen up the tolerence for compressed texture
+ * loosen up the tolerance for compressed texture
* formats
*/
if (is_compressed_format(format))
@@ -544,7 +544,7 @@ test_target_and_format(GLint x, GLint y, GLenum target, GLenum format,
break;
}
- /* If a GLSL program is in use, then the preceeding code should not
+ /* If a GLSL program is in use, then the preceding code should not
* have called glEnable(target). In that case, this code should not
* disable it. For some targets, like GL_TEXTURE_1D_ARRAY,
* glDisable(target) will generate an error.
diff --git a/tests/texturing/fxt1-teximage.c b/tests/texturing/fxt1-teximage.c
index 6a09e036a..e6e636146 100644
--- a/tests/texturing/fxt1-teximage.c
+++ b/tests/texturing/fxt1-teximage.c
@@ -59,7 +59,7 @@ display_mipmaps(int start_x, int start_y)
glEnable(GL_TEXTURE_2D);
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
diff --git a/tests/texturing/gen-compressed-teximage.c b/tests/texturing/gen-compressed-teximage.c
index ec307e30c..2bee9da22 100644
--- a/tests/texturing/gen-compressed-teximage.c
+++ b/tests/texturing/gen-compressed-teximage.c
@@ -55,7 +55,7 @@ static void display_mipmaps(int start_x, int start_y)
{
int i;
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
diff --git a/tests/texturing/gen-nonzero-unit.c b/tests/texturing/gen-nonzero-unit.c
index cfb017a9a..db69c3f78 100644
--- a/tests/texturing/gen-nonzero-unit.c
+++ b/tests/texturing/gen-nonzero-unit.c
@@ -60,7 +60,7 @@ static void display_mipmaps(int start_x, int start_y)
{
int i;
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
diff --git a/tests/texturing/gen-teximage.c b/tests/texturing/gen-teximage.c
index 996681f34..d5a77ec5b 100644
--- a/tests/texturing/gen-teximage.c
+++ b/tests/texturing/gen-teximage.c
@@ -55,7 +55,7 @@ static void display_mipmaps(int start_x, int start_y)
{
int i;
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
diff --git a/tests/texturing/gen-texsubimage.c b/tests/texturing/gen-texsubimage.c
index facf83e63..b9528e0d9 100644
--- a/tests/texturing/gen-texsubimage.c
+++ b/tests/texturing/gen-texsubimage.c
@@ -50,7 +50,7 @@ static void display_mipmaps(int start_x, int start_y)
{
int i;
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = 256; i > 0; i /= 2) {
glBegin(GL_QUADS);
glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
diff --git a/tests/texturing/getteximage-targets.c b/tests/texturing/getteximage-targets.c
index 88bc70296..ea3f195c1 100644
--- a/tests/texturing/getteximage-targets.c
+++ b/tests/texturing/getteximage-targets.c
@@ -59,7 +59,7 @@ init_layer_data(GLubyte *layer_data, int num_layers)
int b = (z + 1) * 255 / (num_layers - 1);
int a = x ^ y ^ z;
- /* each 4x4 block constains only one color (for S3TC) */
+ /* each 4x4 block contains only one color (for S3TC) */
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
data[((y + j) * IMAGE_WIDTH + x
diff --git a/tests/texturing/rg-teximage-common.c b/tests/texturing/rg-teximage-common.c
index 8efa2b5fd..fadb75d47 100644
--- a/tests/texturing/rg-teximage-common.c
+++ b/tests/texturing/rg-teximage-common.c
@@ -27,7 +27,7 @@
*
* Specify an RGBA image with a RED internal format. Read the image back as
* RGBA. Verify the red components read back match the source image and the
- * green, blue, and alpha components are 0, 0, and 1, repsectively.
+ * green, blue, and alpha components are 0, 0, and 1, respectively.
*
* \author Ian Romanick <ian.d.romanick@intel.com>
*/
diff --git a/tests/texturing/s3tc-errors.c b/tests/texturing/s3tc-errors.c
index a356ea214..6c87a7991 100644
--- a/tests/texturing/s3tc-errors.c
+++ b/tests/texturing/s3tc-errors.c
@@ -404,7 +404,7 @@ test_format(int width, int height, GLfloat *image, GLenum requested_format)
pass = piglit_check_gl_error(GL_INVALID_OPERATION) && pass;
- /* Try CompressedTexImage of size zero - should not be an erorr */
+ /* Try CompressedTexImage of size zero - should not be an error */
w = 0;
h = 0;
glCompressedTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0,
diff --git a/tests/texturing/s3tc-teximage.c b/tests/texturing/s3tc-teximage.c
index 1b65f6ce1..91101b63b 100644
--- a/tests/texturing/s3tc-teximage.c
+++ b/tests/texturing/s3tc-teximage.c
@@ -96,7 +96,7 @@ display_mipmaps(int start_x, int start_y)
glEnable(GL_TEXTURE_2D);
#endif
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
piglit_draw_rect_tex(start_x, start_y, i, i,
0.0f, 0.0f, 1.0f, 1.0f);
diff --git a/tests/texturing/s3tc-texsubimage.c b/tests/texturing/s3tc-texsubimage.c
index 7f05b1080..3150b02c2 100644
--- a/tests/texturing/s3tc-texsubimage.c
+++ b/tests/texturing/s3tc-texsubimage.c
@@ -96,7 +96,7 @@ display_mipmaps(int start_x, int start_y)
glEnable(GL_TEXTURE_2D);
#endif
- /* Disply all the mipmap levels */
+ /* Display all the mipmap levels */
for (i = SIZE; i > 0; i /= 2) {
piglit_draw_rect_tex(start_x, start_y, i, i,
0.0f, 0.0f, 1.0f, 1.0f);
diff --git a/tests/texturing/shaders/texelFetch.c b/tests/texturing/shaders/texelFetch.c
index 2495005ee..c0b5a02f1 100644
--- a/tests/texturing/shaders/texelFetch.c
+++ b/tests/texturing/shaders/texelFetch.c
@@ -40,7 +40,7 @@
* - Non-power-of-two textures
*
* Draws a series of "rectangles" which display each miplevel and array slice,
- * at full size. They are layed out as follows:
+ * at full size. They are laid out as follows:
*
* miplevel 3 + + + + +
*
diff --git a/tests/texturing/shaders/textureGather.c b/tests/texturing/shaders/textureGather.c
index fc1bd9f3c..18ac96261 100644
--- a/tests/texturing/shaders/textureGather.c
+++ b/tests/texturing/shaders/textureGather.c
@@ -315,7 +315,7 @@ do_requires(void)
}
/* if we are trying to specify the component from the shader,
- * or use non-constant offsets, or use shadow comparitor, or
+ * or use non-constant offsets, or use shadow comparator, or
* use gsampler2DRect, check that we have ARB_gpu_shader5
*/
if (comp_select != -1 || use_offsets || use_nonconst || comptype == SHADOW_T || sampler == SAMPLER_2DRECT)
diff --git a/tests/texturing/texdepth.c b/tests/texturing/texdepth.c
index fc4be15a3..0f59926f0 100644
--- a/tests/texturing/texdepth.c
+++ b/tests/texturing/texdepth.c
@@ -305,13 +305,13 @@ static struct test_step Tests[] = {
{ test_AmbientShadow, GL_GEQUAL, "Ambient + ARB_shadow: GL_GEQUAL" },
{ test_AmbientShadow, GL_GREATER, "Ambient + EXT_shadow_func: GL_GREATER" },
{ test_AmbientShadow, GL_ALWAYS, "Ambient + EXT_shadow_func: GL_ALWAYS" },
- { test_Homogenous, GL_NEVER, "homogenous: GL_NEVER" },
- { test_Homogenous, GL_LESS, "homogenous: GL_LESS" },
- { test_Homogenous, GL_LEQUAL, "homogenous: GL_LEQUAL" },
+ { test_Homogenous, GL_NEVER, "homogeneous: GL_NEVER" },
+ { test_Homogenous, GL_LESS, "homogeneous: GL_LESS" },
+ { test_Homogenous, GL_LEQUAL, "homogeneous: GL_LEQUAL" },
/* don't test GL_EQUAL and GL_NOTEQUAL: they're bound to be unreliable due to precision problems */
- { test_Homogenous, GL_GEQUAL, "homogenous: GL_GEQUAL" },
- { test_Homogenous, GL_GREATER, "homogenous: GL_GREATER" },
- { test_Homogenous, GL_ALWAYS, "homogenous: GL_ALWAYS" },
+ { test_Homogenous, GL_GEQUAL, "homogeneous: GL_GEQUAL" },
+ { test_Homogenous, GL_GREATER, "homogeneous: GL_GREATER" },
+ { test_Homogenous, GL_ALWAYS, "homogeneous: GL_ALWAYS" },
};
#define NumTests (ARRAY_SIZE(Tests))
diff --git a/tests/texturing/teximage-colors.c b/tests/texturing/teximage-colors.c
index 1b2794785..cfa8f124e 100644
--- a/tests/texturing/teximage-colors.c
+++ b/tests/texturing/teximage-colors.c
@@ -588,8 +588,8 @@ piglit_init(int argc, char **argv)
tolerance[3] = 0.1;
break;
case GL_LUMINANCE6_ALPHA2: /* broken but everybody uses 8+8 bits */
- case GL_LUMINANCE4: /* broken but presumably noone uses just 4 bits */
- case GL_ALPHA4: /* broken but presumably noone uses just 4 bits */
+ case GL_LUMINANCE4: /* broken but presumably no one uses just 4 bits */
+ case GL_ALPHA4: /* broken but presumably no one uses just 4 bits */
case GL_RGBA2: /* broken (4444) but everybody uses more bits anyway */
default:
break;
@@ -863,10 +863,10 @@ test_exact()
int j;
for (j = 0; j < texture_size; ++j) {
for (i = 0; i < tex_width * channels; i++) {
- GLshort datas = ((GLshort *)data)[i];
+ GLshort data_s = ((GLshort *)data)[i];
GLshort obss = ((GLshort *)observed)[i];
- if (!(datas == obss ||
- (datas == -32768 && obss == -32767))) {
+ if (!(data_s == obss ||
+ (data_s == -32768 && obss == -32767))) {
pass = GL_FALSE;
}
}
diff --git a/tests/util/minmax-test.c b/tests/util/minmax-test.c
index ae9a0f98a..8e3aa4d29 100644
--- a/tests/util/minmax-test.c
+++ b/tests/util/minmax-test.c
@@ -278,7 +278,7 @@ void piglit_test_max_float(GLenum token, GLfloat max)
piglit_test_float(token, max, true);
}
-/** Tests tha the range referneced by the token covers at least low-high. */
+/** Tests that the range referenced by the token covers at least low-high. */
void piglit_test_range_float(GLenum token, GLfloat low, GLfloat high)
{
const char *name = piglit_get_gl_enum_name(token);
diff --git a/tests/util/piglit-dispatch.c b/tests/util/piglit-dispatch.c
index 90a6dba27..f600961f0 100644
--- a/tests/util/piglit-dispatch.c
+++ b/tests/util/piglit-dispatch.c
@@ -212,7 +212,7 @@ static int compare_function_names(const void *x, const void *y)
* regardless of whether desktop GL or GLES is in use.
*
* - Synonymous function names (e.g. glMapBuffer and glMapBufferARB)
- * may be used interchangably; the correct function is automatically
+ * may be used interchangeably; the correct function is automatically
* chosen based on the GL version and extension string.
*
* - If the requested function is not supported by the implementation,
diff --git a/tests/util/piglit-fbo.cpp b/tests/util/piglit-fbo.cpp
index df403d717..d21cdeb6a 100644
--- a/tests/util/piglit-fbo.cpp
+++ b/tests/util/piglit-fbo.cpp
@@ -26,7 +26,7 @@
*
* This file defines the functions which can be utilized to develop
* new piglit test cases. These functions initialize a framebuffer
- * object based on paramaters passed.
+ * object based on parameters passed.
*/
#include "piglit-fbo.h"
using namespace piglit_util_fbo;
diff --git a/tests/util/piglit-framework-cl-api.h b/tests/util/piglit-framework-cl-api.h
index c94e5f031..fe4257b51 100644
--- a/tests/util/piglit-framework-cl-api.h
+++ b/tests/util/piglit-framework-cl-api.h
@@ -87,7 +87,7 @@ piglit_cl_test_run_t piglit_cl_api_test_run;
* This macro must be used to create an API test configuration
* instance and must be followed by \c PIGLIT_CL_TEST_API_CONFIG_END macro.
*
- * In beetween \c PIGLIT_CL_API_TEST_CONFIG_BEGIN and
+ * In between \c PIGLIT_CL_API_TEST_CONFIG_BEGIN and
* \c PIGLIT_CL_API_TEST_CONFIG_END macros you can set the test
* configuration values.
*
diff --git a/tests/util/piglit-framework-cl-custom.h b/tests/util/piglit-framework-cl-custom.h
index d6b2b38c1..18e275ec8 100644
--- a/tests/util/piglit-framework-cl-custom.h
+++ b/tests/util/piglit-framework-cl-custom.h
@@ -73,7 +73,7 @@ piglit_cl_test_run_t piglit_cl_custom_test_run;
* This macro must be used to create an CUSTOM test configuration
* instance and must be followed by \c PIGLIT_CL_TEST_CUSTOM_CONFIG_END macro.
*
- * In beetween \c PIGLIT_CL_CUSTOM_TEST_CONFIG_BEGIN and
+ * In between \c PIGLIT_CL_CUSTOM_TEST_CONFIG_BEGIN and
* \c PIGLIT_CL_CUSTOM_TEST_CONFIG_END macros you can set the test
* configuration values.
*
diff --git a/tests/util/piglit-framework-cl-program.h b/tests/util/piglit-framework-cl-program.h
index 98d321acc..fd06ca68f 100644
--- a/tests/util/piglit-framework-cl-program.h
+++ b/tests/util/piglit-framework-cl-program.h
@@ -103,7 +103,7 @@ piglit_cl_test_run_t piglit_cl_program_test_run;
* This macro must be used to create a PROGRAM test configuration
* instance and must be followed by \c PIGLIT_CL_TEST_PROGRAM_CONFIG_END macro.
*
- * In beetween \c PIGLIT_CL_PROGRAM_TEST_CONFIG_BEGIN and
+ * In between \c PIGLIT_CL_PROGRAM_TEST_CONFIG_BEGIN and
* \c PIGLIT_CL_PROGRAM_TEST_CONFIG_END macros you can set the test
* configuration values.
*
diff --git a/tests/util/piglit-framework-cl.h b/tests/util/piglit-framework-cl.h
index f63883cbc..8967627c8 100644
--- a/tests/util/piglit-framework-cl.h
+++ b/tests/util/piglit-framework-cl.h
@@ -149,7 +149,7 @@ piglit_cl_get_test_config(const int argc,
* that is used to retrieve the test configuration, set default
* values to it and implement main function.
*
- * In beetween \c PIGLIT_CL_TEST_CONFIG_BEGIN and
+ * In between \c PIGLIT_CL_TEST_CONFIG_BEGIN and
* \c PIGLIT_CL_TEST_CONFIG_END macros you can set values of fields
* defined in \c test_config_struct_t type.
*
@@ -218,7 +218,7 @@ piglit_cl_get_test_config(const int argc,
* It defines the first part \c test_config_struct_t type with first bytes
* set to \c piglit_cl_text_config_header.
*
- * In beetween \c PIGLIT_CL_DEFINE_TEST_CONFIG_BEGIN and
+ * In between \c PIGLIT_CL_DEFINE_TEST_CONFIG_BEGIN and
* \c PIGLIT_CL_DEFINE_TEST_CONFIG_END macros you can define additional
* fields used by the tests.
*
@@ -352,7 +352,7 @@ piglit_cl_get_device_arg(const int argc,
cl_device_id* device_id);
/**
- * \brief Check if the given local work demensions are supported on this device.
+ * \brief Check if the given local work dimensions are supported on this device.
* @param device_id Device to check
* @param local_work_size Local work dimensions
* @return \c true if the local work dimensions are supported,
diff --git a/tests/util/piglit-framework-gl.h b/tests/util/piglit-framework-gl.h
index a4ecddbe7..074421574 100644
--- a/tests/util/piglit-framework-gl.h
+++ b/tests/util/piglit-framework-gl.h
@@ -203,7 +203,7 @@ struct piglit_gl_test_config {
/**
* Names of subtests supplied on the command line.
*
- * The paramaters passed to each -subtest command line option is
+ * The parameters passed to each -subtest command line option is
* stored here in the order of appearance on the command line.
*/
const char **selected_subtests;
diff --git a/tests/util/piglit-framework-gl/README.txt b/tests/util/piglit-framework-gl/README.txt
index b7aa15dee..1941f65d7 100644
--- a/tests/util/piglit-framework-gl/README.txt
+++ b/tests/util/piglit-framework-gl/README.txt
@@ -27,7 +27,7 @@ this framework if it is ran without the -fbo argument.
-----------------------
This framework, after creating a window, uses it only for making the GL
-context current and attemtps to prevent it from appearing on the screen. For
+context current and attempts to prevent it from appearing on the screen. For
rendering, it instead creates an FBO and sets it as the read and draw buffer.
If you configure Piglit to build with Waffle, each test will usually attempt
diff --git a/tests/util/piglit-framework-gl/piglit_wl_framework.c b/tests/util/piglit-framework-gl/piglit_wl_framework.c
index f0583a67b..79b21d4d5 100644
--- a/tests/util/piglit-framework-gl/piglit_wl_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_wl_framework.c
@@ -237,7 +237,7 @@ enter_event_loop(struct piglit_winsys_framework *winsys_fw)
enum piglit_result result = PIGLIT_PASS;
/* The Wayland window fails to appear on the first call to
- * swapBuffers (which occured in display_cb above). This is
+ * swapBuffers (which occurred in display_cb above). This is
* likely due to swapBuffers being called before receiving an
* expose event. Until piglit has proper Wayland support,
* redraw as a workaround.
diff --git a/tests/util/piglit-glx-util.c b/tests/util/piglit-glx-util.c
index b81feb977..2d813b874 100644
--- a/tests/util/piglit-glx-util.c
+++ b/tests/util/piglit-glx-util.c
@@ -511,7 +511,7 @@ piglit_glx_error_string(int err)
}
/**
- * Get the procedure adddresses for a group of function names
+ * Get the procedure addresses for a group of function names
*
* \note
* If any call to \c glXGetProcAddress fails, this function will call
diff --git a/tests/util/piglit-matrix.c b/tests/util/piglit-matrix.c
index 3c295e622..dd073b75a 100644
--- a/tests/util/piglit-matrix.c
+++ b/tests/util/piglit-matrix.c
@@ -234,7 +234,7 @@ piglit_rotation_matrix(float mat[16], float angle, float x, float y, float z)
* ...etc. Because of those relations and the standard trigonometric
* relations, it is pssible to reduce the transforms down to what
* is used below. It may be that any primary axis chosen will give the
- * same results (modulo a sign convention) using thie method.
+ * same results (modulo a sign convention) using this method.
*
* Particularly nice is to notice that all divisions that might
* have caused trouble when parallel to certain planes or
@@ -381,7 +381,7 @@ piglit_matrix_mul_vector(float out[4],
/**
- * Transfrom NDC coordinate to window coordinate using a viewport.
+ * Transform NDC coordinate to window coordinate using a viewport.
*/
void
piglit_ndc_to_window(float win[3],
diff --git a/tests/util/piglit-util-cl.c b/tests/util/piglit-util-cl.c
index 42a5e72f9..beacd32fd 100644
--- a/tests/util/piglit-util-cl.c
+++ b/tests/util/piglit-util-cl.c
@@ -749,7 +749,7 @@ piglit_cl_create_context(cl_platform_id platform_id,
return NULL;
}
- /* create and assing command queues */
+ /* create and assign command queues */
context->command_queues = malloc(num_devices * sizeof(cl_command_queue));
for(i = 0; i < num_devices; i++) {
context->command_queues[i] = clCreateCommandQueue(context->cl_ctx,
@@ -877,7 +877,7 @@ piglit_cl_fail_build_program_with_source(piglit_cl_context context,
cl_program
piglit_cl_build_program_with_binary_extended(piglit_cl_context context,
- size_t* lenghts,
+ size_t* lengths,
unsigned char** binaries,
const char* options, bool fail)
{
@@ -889,7 +889,7 @@ piglit_cl_build_program_with_binary_extended(piglit_cl_context context,
program = clCreateProgramWithBinary(context->cl_ctx,
context->num_devices,
context->device_ids,
- lenghts,
+ lengths,
(const unsigned char**)binaries,
binary_status,
&errNo);
@@ -957,22 +957,22 @@ piglit_cl_build_program_with_binary_extended(piglit_cl_context context,
}
cl_program
-piglit_cl_build_program_with_binary(piglit_cl_context context, size_t* lenghts,
+piglit_cl_build_program_with_binary(piglit_cl_context context, size_t* lengths,
unsigned char** binaries,
const char* options)
{
- return piglit_cl_build_program_with_binary_extended(context, lenghts,
+ return piglit_cl_build_program_with_binary_extended(context, lengths,
binaries, options,
false);
}
cl_program
piglit_cl_fail_build_program_with_binary(piglit_cl_context context,
- size_t* lenghts,
+ size_t* lengths,
unsigned char** binaries,
const char* options)
{
- return piglit_cl_build_program_with_binary_extended(context, lenghts,
+ return piglit_cl_build_program_with_binary_extended(context, lengths,
binaries, options,
true);
}
diff --git a/tests/util/piglit-util-cl.h b/tests/util/piglit-util-cl.h
index afec6609a..af5b80561 100644
--- a/tests/util/piglit-util-cl.h
+++ b/tests/util/piglit-util-cl.h
@@ -447,14 +447,14 @@ piglit_cl_fail_build_program_with_source(piglit_cl_context context,
* \c piglit_cl_context.
*
* @param context Context on which to create and build program.
- * @param lenghts Lenghts of binaries in \c binaries.
+ * @param lengths Lengths of binaries in \c binaries.
* @param binaries Array of pointers to binaries.
* @param options NULL-terminated string that describes build options.
* @return Built program or NULL on fail.
*/
cl_program
piglit_cl_build_program_with_binary(piglit_cl_context context,
- size_t* lenghts,
+ size_t* lengths,
unsigned char** binaries,
const char* options);
@@ -465,14 +465,14 @@ piglit_cl_build_program_with_binary(piglit_cl_context context,
* in \c piglit_cl_context.
*
* @param context Context on which to create and build program.
- * @param lenghts Lenghts of binaries in \c binaries.
+ * @param lengths Lengths of binaries in \c binaries.
* @param binaries Array of pointers to binaries.
* @param options NULL-terminated string that describes build options.
* @return Unsuccessfully built program or NULL on fail.
*/
cl_program
piglit_cl_fail_build_program_with_binary(piglit_cl_context context,
- size_t* lenghts,
+ size_t* lengths,
unsigned char** binaries,
const char* options);
@@ -497,7 +497,7 @@ piglit_cl_create_buffer(piglit_cl_context context,
* @param offset Offset in buffer.
* @param cb Size of data in bytes.
* @param ptr Pointer to data to be written to buffer.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_write_buffer(cl_command_queue command_queue,
@@ -515,7 +515,7 @@ piglit_cl_write_buffer(cl_command_queue command_queue,
* @param command_queue Command queue to enqueue operation on.
* @param buffer Memory buffer to write to.
* @param ptr Pointer to data to be written to buffer.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_write_whole_buffer(cl_command_queue command_queue,
@@ -530,7 +530,7 @@ piglit_cl_write_whole_buffer(cl_command_queue command_queue,
* @param offset Offset in buffer.
* @param cb Size of data in bytes.
* @param ptr Pointer to data to be written from buffer.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_read_buffer(cl_command_queue command_queue,
@@ -548,7 +548,7 @@ piglit_cl_read_buffer(cl_command_queue command_queue,
* @param command_queue Command queue to enqueue operation on.
* @param buffer Memory buffer to read from.
* @param ptr Pointer to data to be written from buffer.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_read_whole_buffer(cl_command_queue command_queue,
@@ -614,7 +614,7 @@ piglit_cl_create_image(piglit_cl_context context,
* @param origin (x, y, z) offset in pixels.
* @param region (width, height, depht) size in pixels.
* @param ptr Pointer to data to be written to image.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_write_image(cl_command_queue command_queue,
@@ -632,7 +632,7 @@ piglit_cl_write_image(cl_command_queue command_queue,
* @param command_queue Command queue to enqueue operation on.
* @param image Image to write to.
* @param ptr Pointer to data to be written to image.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_write_whole_image(cl_command_queue command_queue,
@@ -647,7 +647,7 @@ piglit_cl_write_whole_image(cl_command_queue command_queue,
* @param origin (x, y, z) offset in pixels.
* @param region (width, height, depht) size in pixels.
* @param ptr Pointer to data read from image.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_read_image(cl_command_queue command_queue,
@@ -665,7 +665,7 @@ piglit_cl_read_image(cl_command_queue command_queue,
* @param command_queue Command queue to enqueue operation on.
* @param image Image to read from.
* @param ptr Pointer to data read from image.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_read_whole_image(cl_command_queue command_queue,
@@ -704,7 +704,7 @@ piglit_cl_create_kernel(cl_program program, const char* kernel_name);
* @param arg_index Argument index.
* @param size Size of argument.
* @param arg_value Pointer to argument value.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_set_kernel_arg(cl_kernel kernel,
@@ -718,7 +718,7 @@ piglit_cl_set_kernel_arg(cl_kernel kernel,
* @param kernel Kernel for which to set an buffer argument.
* @param arg_index Argument index.
* @param buffer Buffer to be set as argument.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_set_kernel_buffer_arg(cl_kernel kernel,
@@ -735,7 +735,7 @@ piglit_cl_set_kernel_buffer_arg(cl_kernel kernel,
* @param global_work_size Global work sizes.
* @param local_work_size Local work sizes.
* @param ev Location to store execution event.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue,
@@ -755,7 +755,7 @@ piglit_cl_enqueue_ND_range_kernel(cl_command_queue command_queue,
* @param global_offset Global offset.
* @param global_work_size Global work sizes.
* @param local_work_size Local work sizes.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue,
@@ -770,7 +770,7 @@ piglit_cl_execute_ND_range_kernel(cl_command_queue command_queue,
*
* @param command_queue Command queue to enqueue operation on.
* @param kernel Kernel to be enqueued.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_enqueue_task(cl_command_queue command_queue, cl_kernel kernel);
@@ -780,7 +780,7 @@ piglit_cl_enqueue_task(cl_command_queue command_queue, cl_kernel kernel);
*
* @param command_queue Command queue to enqueue operation on.
* @param kernel Kernel to be enqueued.
- * @return \c true on succes, \c false otherwise.
+ * @return \c true on success, \c false otherwise.
*/
bool
piglit_cl_execute_task(cl_command_queue command_queue, cl_kernel kernel);
diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 4c4c2ba4f..02439087d 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -464,7 +464,7 @@ piglit_get_compressed_block_size(GLenum format,
/**
- * Compute size (in bytes) neede to store an image in the given compressed
+ * Compute size (in bytes) needed to store an image in the given compressed
* format.
*/
unsigned
@@ -3250,7 +3250,7 @@ static const char multisample_texture_fs_source[] =
* \param samples the number of samples
* \param format format of the pixel data
* \param type type of the pixel data
- * \param data pixel data with whitch to fill the texture
+ * \param data pixel data with which to fill the texture
*
* \return the new texture object id
*/
diff --git a/tests/util/piglit-util-gl.h b/tests/util/piglit-util-gl.h
index 59bdc6aa3..48669b003 100644
--- a/tests/util/piglit-util-gl.h
+++ b/tests/util/piglit-util-gl.h
@@ -133,7 +133,7 @@ piglit_check_gl_error_(GLenum expected_error, const char *file, unsigned line);
/**
* \brief Drain all GL errors.
*
- * Repeatly call glGetError and discard errors until it returns GL_NO_ERROR.
+ * Repeatedly call glGetError and discard errors until it returns GL_NO_ERROR.
*/
void piglit_reset_gl_error(void);
diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
index bf2c9f93e..48d08e82e 100644
--- a/tests/util/piglit-util.c
+++ b/tests/util/piglit-util.c
@@ -128,7 +128,7 @@ int asprintf(char **strp, const char *fmt, ...)
*
* The null-terminated string \a separators is a list of characters at
* which to perform the splits. For example, if separators is " ,", then
- * the function will split the string at each occurence of ' ' and ','.
+ * the function will split the string at each occurrence of ' ' and ','.
*/
const char**
piglit_split_string_to_array(const char *string, const char *separators)
diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c
index 9050a6f23..b69c9390a 100644
--- a/tests/util/piglit_ktx.c
+++ b/tests/util/piglit_ktx.c
@@ -630,9 +630,6 @@ piglit_ktx_load_noncubeface(struct piglit_ktx *self,
const struct piglit_ktx_image *img = &self->images[image];
int level = image;
- glTexParameteri(info->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(info->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
switch (info->target) {
case GL_TEXTURE_1D:
if (piglit_is_gles())
@@ -814,6 +811,17 @@ piglit_ktx_load_texture(struct piglit_ktx *self,
}
glBindTexture(info->target, *tex_name);
+
+ /* Set the max miplevel according to what's in the KTX file. For
+ * mipmapped textures missing some miplevels (i.e., the last miplevel
+ * is not a single pixel), this allows the textures to be considered
+ * "mipmap complete" for sampling operations. Setting this parameter
+ * also can act as an allocation hint to the driver, and thus help
+ * mipmapped textures in general.
+ */
+ glTexParameteri(info->target, GL_TEXTURE_MAX_LEVEL,
+ info->num_miplevels - 1);
+
my_gl_error = glGetError();
if (my_gl_error)
goto fail;
diff --git a/tests/util/piglit_ktx.h b/tests/util/piglit_ktx.h
index d15042357..689d8144c 100644
--- a/tests/util/piglit_ktx.h
+++ b/tests/util/piglit_ktx.h
@@ -52,7 +52,7 @@ struct piglit_ktx_info {
/**
* \brief GL texture target.
*
- * This is the `target` agument passed to glTexImage() It is
+ * This is the `target` argument passed to glTexImage() It is
* completely determined by pixel_size, array_length, and num_faces.
* Valid values are
* - GL_TEXTURE_1D
@@ -99,7 +99,7 @@ struct piglit_ktx_info {
* gl_internal_format. For non-compressed textures,
* gl_base_internal_format is the same as gl_internal_format.
*
- * (I (chadv) dont' understand what purpose this field serves, But
+ * (I (chadv) don't understand what purpose this field serves, But
* the KTX spec requires it in the header).
*/
uint32_t gl_base_internal_format;
diff --git a/tox.ini b/tox.ini
index 8f2791045..ec4124228 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,6 @@ setenv =
USERNAME = foo
deps =
accel-nix: lxml
- accel: simplejson
py{37,38,39,310}-generator: numpy
mock>=4.0
py{37,38,39,310}: mako>=1.1.0
diff --git a/unittests/framework/backends/schema/piglit-10.json b/unittests/framework/backends/schema/piglit-10.json
index c3ce41ed7..dd33d5792 100644
--- a/unittests/framework/backends/schema/piglit-10.json
+++ b/unittests/framework/backends/schema/piglit-10.json
@@ -17,7 +17,7 @@
}
},
"options": {
- "descrption": "The options that were invoked with this run. These are implementation specific and not required.",
+ "description": "The options that were invoked with this run. These are implementation specific and not required.",
"type": "object",
"properties": {
"exclude_tests": {
diff --git a/unittests/framework/backends/schema/piglit-8.json b/unittests/framework/backends/schema/piglit-8.json
index 9b000fd32..e026cdd9b 100644
--- a/unittests/framework/backends/schema/piglit-8.json
+++ b/unittests/framework/backends/schema/piglit-8.json
@@ -14,7 +14,7 @@
"uname": { "type": [ "string", "null" ] },
"time_elapsed": { "$ref": "#/definitions/timeAttribute" },
"options": {
- "descrption": "The options that were invoked with this run. These are implementation specific and not required.",
+ "description": "The options that were invoked with this run. These are implementation specific and not required.",
"type": "object",
"properties": {
"exclude_tests": {
diff --git a/unittests/framework/backends/schema/piglit-9.json b/unittests/framework/backends/schema/piglit-9.json
index 1d401ae61..187997e4a 100644
--- a/unittests/framework/backends/schema/piglit-9.json
+++ b/unittests/framework/backends/schema/piglit-9.json
@@ -14,7 +14,7 @@
"uname": { "type": [ "string", "null" ] },
"time_elapsed": { "$ref": "#/definitions/timeAttribute" },
"options": {
- "descrption": "The options that were invoked with this run. These are implementation specific and not required.",
+ "description": "The options that were invoked with this run. These are implementation specific and not required.",
"type": "object",
"properties": {
"exclude_tests": {
diff --git a/unittests/framework/backends/shared.py b/unittests/framework/backends/shared.py
index 30fd1f9aa..8dd00c040 100644
--- a/unittests/framework/backends/shared.py
+++ b/unittests/framework/backends/shared.py
@@ -33,7 +33,7 @@ INITIAL_METADATA = {
}
# This is current JSON data, in raw form with only the minimum required
-# changes. This does not contain piglit specifc objects, only strings, floats,
+# changes. This does not contain piglit specific objects, only strings, floats,
# ints, and Nones (instead of JSON's null)
JSON = {
"results_version": 10,
diff --git a/unittests/framework/backends/test_compression.py b/unittests/framework/backends/test_compression.py
index 0ff997585..43986ed3e 100644
--- a/unittests/framework/backends/test_compression.py
+++ b/unittests/framework/backends/test_compression.py
@@ -190,7 +190,7 @@ class TestGetMode(object):
def test_env(self, env, config, compressor):
"""Test that when env doesn't have a PIGLIT_COMPRESSION environment
- varaible set, but the configuraiton has a compression method set that
+ variable set, but the configuration has a compression method set that
it is used.
"""
compressor.add('foo', None)
@@ -202,7 +202,7 @@ class TestGetMode(object):
def test_piglit_conf(self, env, config, compressor):
"""Test that when env doesn't have a PIGLIT_COMPRESSION environment
- varaible set, but the configuraiton has a compression method set that
+ variable set, but the configuration has a compression method set that
it is used.
"""
compressor.add('foobar', None)
@@ -214,7 +214,7 @@ class TestGetMode(object):
@pytest.mark.parametrize("extension", ['bz2', 'gz', 'xz'])
def test_duplicate_extensions(extension, tmpdir, config):
- """Tests that exersizes a bug that caused the compressed extension to be
+ """Tests that exercises a bug that caused the compressed extension to be
duplicated in some cases.
"""
tmpdir.chdir()
@@ -230,7 +230,7 @@ def test_duplicate_extensions(extension, tmpdir, config):
@pytest.mark.parametrize("orig,new", itertools.permutations(
['bz2', 'gz', 'xz'], 2))
def test_changed_extension(orig, new, tmpdir, config):
- """Tests that exersizes a bug that caused two extensions to be present if
+ """Tests that exercises a bug that caused two extensions to be present if
the compression method changed.
"""
tmpdir.chdir()
diff --git a/unittests/framework/backends/test_json.py b/unittests/framework/backends/test_json.py
index 3ad99f36a..93559e272 100644
--- a/unittests/framework/backends/test_json.py
+++ b/unittests/framework/backends/test_json.py
@@ -25,10 +25,7 @@ from __future__ import (
absolute_import, division, print_function, unicode_literals
)
import os
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
try:
import mock
except ImportError:
diff --git a/unittests/framework/backends/test_json_update.py b/unittests/framework/backends/test_json_update.py
index 06950ef97..f0a7a9804 100644
--- a/unittests/framework/backends/test_json_update.py
+++ b/unittests/framework/backends/test_json_update.py
@@ -22,10 +22,7 @@
"""Tests for JSON backend version updates."""
import os
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
try:
import mock
except ImportError:
diff --git a/unittests/framework/backends/test_package.py b/unittests/framework/backends/test_package.py
index c4150eb75..e9683db74 100644
--- a/unittests/framework/backends/test_package.py
+++ b/unittests/framework/backends/test_package.py
@@ -298,7 +298,7 @@ class TestSetMeta(object):
def test_notimplemented(self, mock_backend): # pylint: disable=redefined-outer-name,unused-argument
"""backends.load(): An error is raised if a set_meta isn't properly
- implmented.
+ implemented.
"""
with pytest.raises(backends.BackendNotImplementedError):
backends.set_meta('test_backend', {})
diff --git a/unittests/framework/replay/backends/test_package.py b/unittests/framework/replay/backends/test_package.py
index ae2cba19a..af34f7b96 100644
--- a/unittests/framework/replay/backends/test_package.py
+++ b/unittests/framework/replay/backends/test_package.py
@@ -88,6 +88,6 @@ class TestDump(object):
])
def test_notimplemented(self, mock_backend): # pylint: disable=unused-argument
"""backends.dump(): An error is raised if a dumper isn't properly
- implmented.
+ implemented.
"""
backends.dump('foo.test_backend')
diff --git a/unittests/framework/replay/test_compare_replay.py b/unittests/framework/replay/test_compare_replay.py
index 332011b7a..9c77d0b91 100644
--- a/unittests/framework/replay/test_compare_replay.py
+++ b/unittests/framework/replay/test_compare_replay.py
@@ -1,6 +1,7 @@
# coding=utf-8
#
# Copyright © 2020 Valve Corporation.
+# Copyright © 2022 Collabora Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -91,23 +92,34 @@ class TestCompareReplay(object):
if yaml_file == 'empty.yml':
return {}
elif yaml_file == 'no-device.yml':
- return {"traces":
- [{"path": "glmark2/desktop-blur-radius=5:effect=blur:passes=1:separable=true:windows=4.rdc",
- "expectations": [{"device": "gl-vmware-llvmpipe",
- "checksum": "8867f3a41f180626d0d4b7661ff5c0f4"}]},]}
+ return {"traces": {
+ "glmark2/desktop-blur-radius=5:effect=blur:passes=1:separable=true:windows=4.rdc": {
+ "gl-vmware-llvmpipe": {
+ "checksum": "8867f3a41f180626d0d4b7661ff5c0f4"
+ }
+ }
+ }}
elif yaml_file == 'one-trace.yml':
- return {"traces":
- [{"path": "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr",
- "expectations": [{"device": OPTIONS.device_name,
- "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"}]},]}
+ return {"traces": {
+ "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr": {
+ OPTIONS.device_name: {
+ "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"
+ }
+ }
+ }}
elif yaml_file == 'two-traces.yml':
- return {"traces":
- [{"path": "pathfinder/demo.trace",
- "expectations": [{"device": OPTIONS.device_name,
- "checksum": "e624d76c70cc3c532f4f54439e13659a"}]},
- {"path": "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr",
- "expectations": [{"device": OPTIONS.device_name,
- "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"}]},]}
+ return {"traces": {
+ "pathfinder/demo.trace": {
+ OPTIONS.device_name: {
+ "checksum": "e624d76c70cc3c532f4f54439e13659a"
+ }
+ },
+ "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr": {
+ OPTIONS.device_name: {
+ "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"
+ }
+ }
+ }}
else:
raise exceptions.PiglitFatalError(
'Non treated YAML file: {}'.format(yaml_file))
@@ -252,6 +264,8 @@ class TestCompareReplay(object):
assert s.endswith('PIGLIT: '
'{"images": [{'
'"image_desc": "' + self.trace_path + '", '
+ '"checksum_ref": "' + self.exp_checksum + '", '
+ '"checksum_render": "' + self.exp_checksum + '", '
'"image_ref": "' + self.exp_checksum + '.png", '
'"image_render": "' + self.exp_checksum + '.png"'
'}], "result": "pass"}\n')
@@ -280,6 +294,8 @@ class TestCompareReplay(object):
assert s.endswith('PIGLIT: '
'{"images": [{'
'"image_desc": "' + self.trace_path + '", '
+ '"checksum_ref": "' + self.exp_checksum + '", '
+ '"checksum_render": "' + self.exp_checksum + '", '
'"image_ref": "' + self.exp_checksum + '.png", '
'"image_render": "' + final_image_pathlib.strpath +
'"}], "result": "pass"}\n')
@@ -308,6 +324,8 @@ class TestCompareReplay(object):
assert s.endswith('PIGLIT: '
'{"images": [{'
'"image_desc": "' + self.trace_path + '", '
+ '"checksum_ref": "' + wrong_checksum + '", '
+ '"checksum_render": "' + self.exp_checksum + '", '
'"image_ref": "' + wrong_checksum + '.png", '
'"image_render": "' + final_image_pathlib.strpath +
'"}], "result": "fail"}\n')
@@ -338,6 +356,8 @@ class TestCompareReplay(object):
assert s.endswith('PIGLIT: '
'{"images": [{'
'"image_desc": "' + trace_path + '", '
+ '"checksum_ref": "' + third_exp_checksum + '", '
+ '"checksum_render": null, '
'"image_ref": "' + third_exp_checksum + '.png", '
'"image_render": null}], "result": "crash"}\n')
@@ -367,5 +387,7 @@ class TestCompareReplay(object):
assert s.endswith('PIGLIT: '
'{"images": [{'
'"image_desc": "' + trace_path + '", '
+ '"checksum_ref": "' + third_exp_checksum + '", '
+ '"checksum_render": null, '
'"image_ref": "' + third_exp_checksum + '.png", '
'"image_render": null}], "result": "crash"}\n')
diff --git a/unittests/framework/replay/test_frame_times.py b/unittests/framework/replay/test_frame_times.py
index 2455d993f..f69dc83f6 100644
--- a/unittests/framework/replay/test_frame_times.py
+++ b/unittests/framework/replay/test_frame_times.py
@@ -1,7 +1,7 @@
# coding=utf-8
#
# Copyright © 2020 Valve Corporation.
-# Copyright © 2021 Collabora Ltd.
+# Copyright © 2021 ‒ 2022 Collabora Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -57,23 +57,35 @@ class TestFrameTimes(object):
if yaml_file == 'empty.yml':
return {}
elif yaml_file == 'no-device.yml':
- return {"traces":
- [{"path": "glmark2/desktop-blur-radius=5:effect=blur:passes=1:separable=true:windows=4.rdc",
- "expectations": [{"device": "gl-vmware-llvmpipe",
- "checksum": "8867f3a41f180626d0d4b7661ff5c0f4"}]},]}
+ return {"traces": {
+ "glmark2/desktop-blur-radius=5:effect=blur:passes=1:separable=true:windows=4.rdc": {
+ "gl-vmware-llvmpipe": {
+ "checksum": "8867f3a41f180626d0d4b7661ff5c0f4"
+ }
+ }
+ }}
elif yaml_file == 'one-trace.yml':
- return {"traces":
- [{"path": "pathfinder/demo.trace",
- "expectations": [{"device": OPTIONS.device_name,
- "checksum": "e624d76c70cc3c532f4f54439e13659a"}]},]}
+ return {"traces": {
+ "pathfinder/demo.trace": {
+ OPTIONS.device_name: {
+ "checksum": "e624d76c70cc3c532f4f54439e13659a"
+ }
+ }
+ }}
elif yaml_file == 'two-traces.yml':
- return {"traces":
- [{"path": "pathfinder/demo.trace",
- "expectations": [{"device": OPTIONS.device_name,
- "checksum": "e624d76c70cc3c532f4f54439e13659a"}]},
- {"path": "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr",
- "expectations": [{"device": OPTIONS.device_name,
- "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"}]},]}
+ return {"traces": {
+ "pathfinder/demo.trace": {
+ OPTIONS.device_name: {
+ "checksum": "e624d76c70cc3c532f4f54439e13659a"
+ }
+ },
+ "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr": {
+ OPTIONS.device_name: {
+ "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"
+ }
+ }
+ }}
+
else:
raise exceptions.PiglitFatalError(
'Non treated YAML file: {}'.format(yaml_file))
diff --git a/unittests/framework/replay/test_query_traces_yaml.py b/unittests/framework/replay/test_query_traces_yaml.py
index e131f4721..ae039b7e1 100644
--- a/unittests/framework/replay/test_query_traces_yaml.py
+++ b/unittests/framework/replay/test_query_traces_yaml.py
@@ -46,21 +46,37 @@ b:
{"a": 1, "b": {"c": 2}}],
]
-TRACES_DATA = {"traces":
- [{"path": "glmark2/desktop-blur-radius=5:effect=blur:passes=1:separable=true:windows=4.rdc",
- "expectations": [{"device": "gl-vmware-llvmpipe",
- "checksum": "8867f3a41f180626d0d4b7661ff5c0f4"}]},
- {"path": "glxgears/glxgears-2.trace",
- "expectations": [{"device": "gl-vmware-llvmpipe",
- "checksum": "f8eba0fec6e3e0af9cb09844bc73bdc7"},
- {"device": "gl-virgl",
- "checksum": "f8eba0fec6e3e0af9cb09844bc73bdc7"}]},
- {"path": "pathfinder/demo.trace",
- "expectations": [{"device": "gl-vmware-llvmpipe",
- "checksum": "e624d76c70cc3c532f4f54439e13659a"}]},
- {"path": "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr",
- "expectations": [{"device": "vk-amd-polaris10",
- "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"}]},]}
+TRACES_DATA = {"traces": {
+ "glmark2/desktop-blur-radius=5:effect=blur:passes=1:separable=true:windows=4.rdc": {
+ "gl-vmware-llvmpipe": {
+ "checksum": "8867f3a41f180626d0d4b7661ff5c0f4"
+ }
+ },
+ "glxgears/glxgears-2.trace": {
+ "gl-vmware-llvmpipe": {
+ "checksum": "f8eba0fec6e3e0af9cb09844bc73bdc7"
+ },
+ "gl-virgl": {
+ "checksum": "f8eba0fec6e3e0af9cb09844bc73bdc7"
+ }
+ },
+ "pathfinder/demo.trace": {
+ "gl-vmware-llvmpipe": {
+ "checksum": "e624d76c70cc3c532f4f54439e13659a"
+ }
+ },
+ "KhronosGroup-Vulkan-Tools/amd/polaris10/vkcube.gfxr": {
+ "vk-amd-polaris10": {
+ "checksum": "917cbbf4f09dd62ea26d247a1c70c16e"
+ }
+ },
+ "pathfinder/demo2.trace": {
+ "gl-vmware-llvmpipe": {
+ "label": ["skip"]
+ }
+ }
+ }
+}
@pytest.mark.raises(exception=exceptions.PiglitFatalError)
def test_load_yaml_PiglitFatalError():
@@ -78,36 +94,10 @@ def test_load_yaml_basic():
@pytest.mark.raises(exception=TypeError)
-@pytest.mark.parametrize("trace", [
- ([]),
- ({"expectations": "one"}),
- ({"expectations": ["one", "another"]}),
-])
-def test_trace_devices_TypeError(trace):
- """query_traces_yaml.trace_devicess: Raise TypeError on invalid trace"""
- d = qty.trace_devices(trace)
-
-
-@pytest.mark.parametrize("trace, expected", [
- ({}, []),
- ({"one": 1}, []),
- ({"expectations": [{"one": 1}]}, []),
- ({"expectations": [{"device": "gl-vmware-lvmpipe"}]},
- ["gl-vmware-lvmpipe"]),
- ({"expectations": [{"device": "gl-vmware-lvmpipe"},
- {"device": "vk-intel-anv", "checksum": "a checksum"}]},
- ["gl-vmware-lvmpipe", "vk-intel-anv"]),
-])
-def test_trace_devices_basic(trace, expected):
- """query_traces_yaml.trace_devicess: Get devices from some basic traces"""
- assert expected == qty.trace_devices(trace)
-
-
-@pytest.mark.raises(exception=TypeError)
@pytest.mark.parametrize("trace, device", [
([], None),
- ({"expectations": "one"}, None),
- ({"expectations": ["one", "another"]}, None),
+ ({"one"}, None),
+ ({"one", "another"}, None),
])
def test_trace_checksum_TypeError(trace, device):
"""query_traces_yaml.trace_checksum: Raise TypeError on invalid trace"""
@@ -117,17 +107,12 @@ def test_trace_checksum_TypeError(trace, device):
@pytest.mark.parametrize("trace, device, expected", [
({}, None, ''),
({"one": 1}, None, ''),
- ({"expectations": [{"one": 1}]}, None, ''),
- ({"expectations": [{"device": "gl-vmware-lvmpipe"}]}, "gl-vmware-lvmpipe", ''),
- ({"expectations": [{"device": "gl-vmware-lvmpipe", "checksum": "a checksum"}]},
+ ({"gl-vmware-lvmpipe": {}}, "gl-vmware-lvmpipe", ''),
+ ({"gl-vmware-lvmpipe": {"checksum": "a checksum"}},
"gl-vmware-lvmpipe", "a checksum"),
- ({"expectations": [{"device": "gl-vmware-lvmpipe", "checksum": "a checksum"},
- {"device": "vk-intel-anv", "checksum": "another checksum"}]},
- "vk-intel-anv", "another checksum"),
- ({"expectations": [{"device": "gl-vmware-lvmpipe", "checksum": "a checksum"},
- {"device": "vk-intel-anv", "checksum": "another checksum"},
- {"device": "vk-intel-anv", "checksum": "yet another checksum"}]},
- "vk-intel-anv", "another checksum"),
+ ({"gl-vmware-lvmpipe": {"checksum": "a checksum"},
+ "vk-intel-anv": {"checksum": "another checksum"}},
+ "vk-intel-anv", "another checksum")
])
def test_trace_checksum_basic(trace, device, expected):
"""query_traces_yaml.trace_checksum: Get checksum from some basic traces"""
@@ -165,7 +150,7 @@ def test_traces_AttributeError(yaml, ext, device, checksum):
t = list(qty.traces(yaml, ext, device, checksum))
-@pytest.mark.raises(exception=TypeError)
+@pytest.mark.raises(exception=AttributeError)
@pytest.mark.parametrize("yaml, ext, device, checksum", [
({"traces": "one"}, ".trace", "gl-vmware-llvmpipe", True),
({"traces": ["one"]}, ".trace", "gl-vmware-llvmpipe", True),
@@ -178,7 +163,7 @@ def test_traces_TypeError(yaml, ext, device, checksum):
@pytest.mark.parametrize("yaml, ext, device, checksum, expected", [
({}, ".trace", "gl-vmware-llvmpipe", True, []),
- ({"traces": [{}]}, ".trace", "gl-vmware-llvmpipe", True, []),
+ ({"traces": {}}, ".trace", "gl-vmware-llvmpipe", True, []),
(TRACES_DATA, "", "gl-virgl", False, []),
(TRACES_DATA, ".rdc", "gl-virgl", False, []),
(TRACES_DATA, ".trace", "gl-virgl", False,
diff --git a/unittests/framework/skip.py b/unittests/framework/skip.py
index 4a3bcf3a9..de8e896b8 100644
--- a/unittests/framework/skip.py
+++ b/unittests/framework/skip.py
@@ -33,9 +33,9 @@ import pytest
# pylint: disable=invalid-name
posix = pytest.mark.skipif(
- os.name != 'posix', reason="Test is only relavent on posix systems.")
+ os.name != 'posix', reason="Test is only relevant on posix systems.")
windows = pytest.mark.skipif(
- os.name != 'nt', reason="Test is only relavent on Microsoft Windows.")
+ os.name != 'nt', reason="Test is only relevant on Microsoft Windows.")
linux = pytest.mark.skipif(
not sys.platform.startswith('linux'),
- reason="Test is only relavent on Linux OSes.")
+ reason="Test is only relevant on Linux OSes.")
diff --git a/unittests/framework/summary/test_feature.py b/unittests/framework/summary/test_feature.py
index 750be42b3..f45dee625 100644
--- a/unittests/framework/summary/test_feature.py
+++ b/unittests/framework/summary/test_feature.py
@@ -21,10 +21,7 @@
"""Tests for the feature summary module."""
-try:
- import simplejson as json
-except ImportError:
- import json
+import json
try:
import mock
except ImportError:
diff --git a/unittests/framework/test/test_base.py b/unittests/framework/test/test_base.py
index 2daca3cc3..db7a50fb4 100644
--- a/unittests/framework/test/test_base.py
+++ b/unittests/framework/test/test_base.py
@@ -113,7 +113,7 @@ class TestTest(object):
# localpath doesn't have a seek option
with tmpdir.join('test').open(mode='w', ensure=True) as f:
- # Create a file that wll be executed as a python script Create
+ # Create a file that will be executed as a python script Create
# a process with two subproccesses (not threads) that will run
# for a long time.
f.write(textwrap.dedent("""\
@@ -192,14 +192,14 @@ class TestTest(object):
class TestExecuteTraceback(object):
"""Test.execute tests for Traceback handling."""
- class Sentinal(Exception):
+ class Sentinel(Exception):
pass
@pytest.fixture
def shared_test(self, mocker):
"""Do some setup."""
test = _Test(['foo'])
- test.run = mocker.Mock(side_effect=self.Sentinal)
+ test.run = mocker.Mock(side_effect=self.Sentinel)
test.execute(mocker.Mock(spec=str),
mocker.Mock(spec=log.BaseLog),
@@ -348,7 +348,7 @@ class TestValgrindMixin(object):
"""Tests for the ValgrindMixin class."""
def test_command(self, mocker):
- """test.base.ValgrindMixin.command: self.command doesnt change."""
+ """test.base.ValgrindMixin.command: self.command doesn't change."""
opts = mocker.patch('framework.test.base.OPTIONS',
new_callable=Options)
@@ -396,7 +396,7 @@ class TestValgrindMixin(object):
ids=lambda x: str(x).upper())
def test_problem_status_changes_valgrind_enabled(self, starting, mocker):
"""When running with valgrind mode we're actually testing the test
- binary itself, so any status other than pass is irrelavent, and
+ binary itself, so any status other than pass is irrelevant, and
should be marked as skip.
"""
mock_opts = mocker.patch('framework.test.base.OPTIONS',
@@ -411,7 +411,7 @@ class TestValgrindMixin(object):
@pytest.mark.parametrize("starting", PROBLEMS,
ids=lambda x: str(x).upper())
def test_problems_with_valgrind_disabled(self, starting, mocker):
- """When valgrind is disabled nothign shoud change
+ """When valgrind is disabled nothing should change
"""
mock_opts = mocker.patch('framework.test.base.OPTIONS',
new_callable=Options)
@@ -545,7 +545,7 @@ class TestReducedProcessMixin(object):
# Since interpret_result isn't called this would normally be left
# as NOTRUN, but we want to ensure that _run_command isn't mucking
- # with it, so we set it to this PASS, which acts as a sentinal
+ # with it, so we set it to this PASS, which acts as a sentinel
test.result.subtests['b'] = status.PASS
test._run_command()
diff --git a/unittests/framework/test/test_deqp.py b/unittests/framework/test/test_deqp.py
index b668eb09a..1dc5c97de 100644
--- a/unittests/framework/test/test_deqp.py
+++ b/unittests/framework/test/test_deqp.py
@@ -65,7 +65,7 @@ class TestIterDeqpTestCases(object):
"""Tests for iter_deqp_test_cases."""
def _do_test(self, write, expect, tmpdir):
- """Run the acutal test."""
+ """Run the actual test."""
p = tmpdir.join('foo')
p.write(write)
gen = deqp.iter_deqp_test_cases(str(p))
diff --git a/unittests/framework/test/test_opengl.py b/unittests/framework/test/test_opengl.py
index cc9c656ae..af4b62826 100644
--- a/unittests/framework/test/test_opengl.py
+++ b/unittests/framework/test/test_opengl.py
@@ -60,8 +60,8 @@ class TestFastSkipMixin(object): # pylint: disable=too-many-public-methods
def test_api(self):
"""Tests that the api works.
- Since you're not suppoed to be able to pass gl and gles version, this
- uses two seperate constructor calls.
+ Since you're not supposed to be able to pass gl and gles version, this
+ uses two separate constructor calls.
"""
self._Test(['foo'], extensions={'foo'}, api_version=3, shader_version=2)
self._Test(['foo'], extensions={'foo'}, api_version=3,
@@ -248,8 +248,8 @@ class TestFastSkipMixinDisabled(object):
def test_api(self):
"""Tests that the api works.
- Since you're not suppoed to be able to pass gl and gles version, this
- uses two seperate constructor calls.
+ Since you're not supposed to be able to pass gl and gles version, this
+ uses two separate constructor calls.
"""
self._Test(['foo'], extensions={'foo'}, api_version=3, shader_version=2)
self._Test(['foo'], extensions={'foo'}, api_version=3,
diff --git a/unittests/framework/test_core.py b/unittests/framework/test_core.py
index be4198103..795faeea7 100644
--- a/unittests/framework/test_core.py
+++ b/unittests/framework/test_core.py
@@ -37,7 +37,7 @@ from framework import exceptions
from . import skip
-# Making good test names often flies in the face of PEP8 recomendations, ignore
+# Making good test names often flies in the face of PEP8 recommendations, ignore
# those
# pylint: disable=invalid-name
#
diff --git a/unittests/framework/test_dmesg.py b/unittests/framework/test_dmesg.py
index 70199cf09..d91accd81 100644
--- a/unittests/framework/test_dmesg.py
+++ b/unittests/framework/test_dmesg.py
@@ -205,7 +205,7 @@ class TestLinuxDmesgTimestamps(object):
def test_not_timestamps(self, mocker):
"""If _last_message is populated but doesn't have a valid timestamp
- then an PiglitFatalException shoudl be raised.
+ then an PiglitFatalException should be raised.
"""
mocker.patch('framework.dmesg.subprocess.check_output',
mocker.Mock(return_value=b'foo\nbar\n'))
@@ -274,7 +274,7 @@ class TestLinuxDmesg(object):
assert result.dmesg == '[2.0]is\n[2.5]dmesg!'
def test_update_result_no_change(self):
- """When update_result is called but no changes to dmesg have occured it
+ """When update_result is called but no changes to dmesg have occurred it
should not set the dmesg attribute.
"""
result = results.TestResult('pass')
@@ -342,7 +342,7 @@ class TestGetDmesg(object):
],
ids=_name_get_dmesg)
def test_get_dmesg(self, platform, dummy, expected, mocker):
- """Test that get_dmesg returns the expected dmesg type on variuos
+ """Test that get_dmesg returns the expected dmesg type on various
platforms with various configurations.
"""
mocker.patch('framework.dmesg.sys.platform', platform)
diff --git a/unittests/framework/test_log.py b/unittests/framework/test_log.py
index 989de8734..3e123a348 100644
--- a/unittests/framework/test_log.py
+++ b/unittests/framework/test_log.py
@@ -97,7 +97,7 @@ class TestQuietLog(object):
quiet.summary()
sys.stdout.seek(0)
- # Because of the 'lastlength' mechanims there will likely be
+ # Because of the 'lastlength' mechanisms there will likely be
# trainling whitespace after the the output, it's not useful to
# test that here, so just strip it.
assert sys.stdout.read().rstrip() == '[1/1] pass: 1'
diff --git a/unittests/framework/test_results.py b/unittests/framework/test_results.py
index 414c455a3..1b09d41fe 100644
--- a/unittests/framework/test_results.py
+++ b/unittests/framework/test_results.py
@@ -135,7 +135,7 @@ class TestTestResult(object):
backends.json.piglit_decoder, not by the from_dict method of
TestResult. So in this case the test is that the object is a
dictionary, not a TimeAttribute because this method shouldn't
- make the coversion.
+ make the conversion.
"""
# pylint: disable=unsubscriptable-object
@@ -423,7 +423,7 @@ class TestStringDescriptor(object):
assert test.val == 'foo'
def test_set_str_unicode_literals(self, test):
- """results.StringDescriptor.__set__: handles unicode litterals in strs.
+ """results.StringDescriptor.__set__: handles unicode literals in strs.
"""
test.val = '\ufffd'
assert test.val == '�'
diff --git a/unittests/framework/test_status.py b/unittests/framework/test_status.py
index d4fc9d9a0..76a15a9e1 100644
--- a/unittests/framework/test_status.py
+++ b/unittests/framework/test_status.py
@@ -63,7 +63,7 @@ NO_OPS = [status.SKIP, status.NOTRUN]
@pytest.mark.raises(exception=status.StatusException)
def test_bad_lookup():
- """status.status_lookup: An unexepcted value raises a StatusException"""
+ """status.status_lookup: An unexpected value raises a StatusException"""
status.status_lookup('foobar')
diff --git a/unittests/framework/test_wflinfo.py b/unittests/framework/test_wflinfo.py
index 222bdfa90..833933652 100644
--- a/unittests/framework/test_wflinfo.py
+++ b/unittests/framework/test_wflinfo.py
@@ -302,7 +302,7 @@ class TestWflInfo(object):
def test_gl_version(self, inst):
"""wflinfo.WflInfo.get_gl_version: Handles OSError "no file"
- gracefull.
+ graceful.
"""
assert inst.core.api_version == 0.0