...
 
Commits (10772)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

((nil . ((indent-tabs-mode . t)
(tab-width . 8)
(show-trailing-whitespace . t)
(whitespace-style face indentation)
(whitespace-line-column . 79)))
(prog-mode .
((c-file-style . "linux")
(eval ignore-errors
(require 'whitespace)
(whitespace-mode 1))))
(cmake-mode .
((cmake-tab-width . 8)
(eval ignore-errors
(require 'whitespace)
(whitespace-mode 1))))
(python-mode .
((indent-tabs-mode . nil)
(tab-width . 4)
(whitespace-line-column . 80)))
)
root = true
[*.py]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
max_line_length = 79
[*.{c,cpp,h,hpp}]
indent_style = tab
tab_width = 8
max_line_length = 78
[*.{cmake,txt}]
indent_style = tab
tab_width = 8
max_line_length = 78
[{README,HACKING}]
indent_style = tab
tab_width = 8
max_line_length = 78
*.mako -crlf
.*.sw?
*.pyc
*.tar.bz2
*.zip
*~
.ninja_log
build.ninja
rules.ninja
.ninja_deps
_CPack_Packages
bin
lib
CMakeFiles
CPackConfig.cmake
CPackSourceConfig.cmake
Makefile
cmake_install.cmake
CMakeCache.txt
target_api
tests/glslparsertest/glslcompiler
generated_tests/cl
compile_commands.json
.tox/
.cache/
__pycache__/
*.css
*.html
tests/*.xml
tests/*.xml.gz
!tests/*.meta.xml
pages:
image: alpine
script:
- apk --no-cache add py2-pip python-dev
- pip install sphinx
- pip install Flask-Sphinx-Themes
- cd docs
- ./build-html.sh
- mv _build/html/ ../public/
artifacts:
paths:
- public
only:
refs:
- master
changes:
- docs/**
language: python
os: linux
# Use Ubuntu Xenial (16.04 LTS) environment.
dist: xenial
cache:
- ccache
- pip
services:
- docker
env:
global:
- BUILD=pytest
matrix:
include:
- env: BUILD=cmake
- python: 2.7
env: TOX_ENV="py27-{generator,noaccel,accel-nix,streams}"
- python: 3.5
env: TOX_ENV="py35-{generator,noaccel,accel-nix,streams}"
- python: 3.6
env: TOX_ENV="py36-{generator,noaccel,accel-nix,streams}"
- python: 3.7
env: TOX_ENV="py37-{generator,noaccel,accel-nix,streams}"
install:
- |
if [[ $BUILD == pytest ]]; then
pip install tox
else
wget https://github.com/grammarly/rocker/releases/download/1.3.1/rocker-1.3.1-linux_amd64.tar.gz
tar xvf rocker-1.3.1-linux_amd64.tar.gz
rm rocker-1.3.1-linux_amd64.tar.gz
fi
before_script:
- |
if [[ $BUILD != pytest ]]; then
mkdir -p -m777 ~/.ccache
fi
script:
- |
if [[ $BUILD == pytest ]]; then
tox -e $TOX_ENV
else
./rocker build -f docker/Rockerfile.piglit ${DOCKER_TAG:+--var TAG=}${DOCKER_TAG} ${DOCKER_IMAGE:+--var IMAGE=}${DOCKER_IMAGE} ${DOCKER_PARENT:+--var PARENT=}${DOCKER_PARENT} .
fi
after_success:
- |
if [[ $BUILD != pytest ]]; then
if [[ -n $DOCKER_IMAGE && -n $DOCKER_TAG && -n $DOCKER_USERNAME && $TRAVIS_BRANCH == master ]]; then
docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"
docker push "${DOCKER_IMAGE}":"${DOCKER_TAG}"
fi
fi
This diff is collapsed.
License details should be listed in each source file. This COPYING
file is intended as a quick overview of the licenses involved in this
project, but is not a complete list and doesn't replace the licenses
on individual files.
The following is the 'standard copyright' agreed upon by most
contributors, and is currently the canonical license preferred by the
piglit project.
/*
* Copyright © 2010 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.
*/
In order to include tests for shaders from various projects with other
licenses, some other licenses apply to some portions of the code:
tests/glslparsertest/glsl2/gst-gl-*
/*
* GStreamer
* Copyright (C) 2007 David A. Schleef <ds@schleef.org>
* Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
* Copyright (C) 2008-2009 Julien Isorce <julien.isorce@gmail.com>
* Copyright (C) 2008 Cyril Comparon <cyril.comparon@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
tests/glslparsertest/glsl2/norsetto-*
/*
* Copyright (c) 2007 Cesare Tirabassi <norsetto@ubuntu.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
tests/glslparsertest/glsl2/xreal-*
tests/glslparsertest/glsl2/xonotic-*
tests/shaders/glsl-gnome-shell-dim-window.shader_test
/* Full text of the GPL v2 is included in licenses/GPL-2 */
/*
===========================================================================
Copyright (C) 2006 Robert Beckebans <trebor_7@users.sourceforge.net>
This file is part of XreaL source code.
XreaL source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
XreaL source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with XreaL source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
tests/glslparsertest/shaders/*
/************************************************************************
* *
* Copyright (C) 2002-2005 3Dlabs Inc. Ltd. *
* *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* *
* Redistributions of source code must retain the above copyright *
* notice, this list of conditions and the following disclaimer. *
* *
* Redistributions in binary form must reproduce the above *
* copyright notice, this list of conditions and the following *
* disclaimer in the documentation and/or other materials provided *
* with the distribution. *
* *
* Neither the name of 3Dlabs Inc. Ltd. nor the names of its *
* contributors may be used to endorse or promote products derived *
* from this software without specific prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
* POSSIBILITY OF SUCH DAMAGE. *
* *
************************************************************************/
......@@ -63,23 +63,138 @@ entirely new project. The most important reasons are:
\ Coding style
-------------
\ Ugly Things (or: Coding style)
-------------------------------
Basic formatting:
As a rule of thumb, coding style should be preserved in test code taken from
other projects, as long as that code is self-contained.
* Indent with 8-column tabs
* Limit lines to 78 characters or less
* Function return type and name go on successive lines
* Opening function brace goes on line by itself
* Opening statement braces go on same line as the 'for' or 'else'
* Use /* C style comments */, not // C++ style
* Don't write 'if (condition) statement;' on one line - put the statement on
a separate line. Braces around a single statement are optional.
Apart from that, the following rules are cast in stone:
The following indent command will generally format your code for piglit's
style:
1. Use tabulators for indentation
2. Use spaces for alignment
3. No whitespace at the end of a line
indent -br -i8 -npcs -ce input.c -o output.c
See http://electroly.com/mt/archives/000002.html for a well-written rationale.
Use whatever tabulator size you want:
If you adhere to the rules above, the tab size does not matter. Tab size 4
is recommended because it keeps the line lengths reasonable, but in the end,
that's purely a matter of personal taste.
Though, that doesn't give perfect results. It messes up the
PIGLIT_GL_TEST_CONFIG_BEGIN/END section. And array initializers sometimes
come out funny.
When in doubt see other recently added piglit tests for coding style.
Code conventions:
* Use "const" qualifiers whenever possible on array declarations, pointers
and global variables.
* Use "static const" for initialized arrays whenever possible.
* Preprocessor macros should be UPPER_CASE
* Enumeration tokens should be UPPER_CASE
* Most other identifiers are lower_case_with_underscores
* Library, executable, and source file names are '<base>_<api>.'
e.g. libpiglitutil_gles2
* Test names are '<lowercasegroupname>-<testname>.' e.g. glsl-novertexdata
* Use int, float, bool except when GL types (GLint, GLfloat) are really needed
* Always declare GL entrypoint pointer type with APIENTRY, or use piglit
dispatch typedef
Test conventions:
* The goal is to find bugs and demonstrate them as simply as possible, not
to measure performance or demonstrate features.
* Write tests that are easily read, understood and debugged. Long, complicated
functions are frowned upon.
* Don't try to test too much in a single test program. Most piglit programs
are less than 300 lines long.
* If a test doesn't render anything, it doesn't need to set the window size.
* Avoid changing an existing testing such that it might fail where it
previously passed. Break it into subtests and add a new subtest, or add
a new test which supersedes the old one.
* Things that should be seen are drawn in green (or blue as a second color)
while red is for things that shouldn't be seen.
* Calculate drawing coordinates from piglit_width/piglit_height as needed,
instead of hard coding.
* If a test can safely run at the same time as other tests, add it as a
concurrent test in 'all.tests' (or wherever you add it).
Utility code:
Piglit has a rich set of utility functions for basic drawing, setting
up shaders, probing pixels, error checking, etc. Try to use them before
rolling your own.
Python framework:
Piglit uses python's PEP8 standard for formatting of python code; using only
spaces with no tabs for indenting. See
http://www.python.org/dev/peps/pep-0008/ for more information.
\ Release Philosophy
-------------------
Since Piglit is a test suite, it is "production software" at all times.
Test case might be incorrect, but despite that it is not useful to speak of
"stable" and "unstable" versions of a test suite, especially one that sees
a relatively small rate of change like Piglit.
For this reason, developers of OpenGL drivers and related software, and even
testers are encouraged to follow the git repository on freedesktop.org at all
times. A web interface to this repository can be found here:
https://gitlab.freedesktop.org/mesa/piglit
Nevertheless, for purposes of marking a specific point in time for packaging
in an environment where non-developers do tests on a wide range of hardware,
it has been pointed out that it would be useful to have official releases.
For this reason, we will occasionally bump the version number in the file
RELEASE and create an appropriate tag in the git repository.
This tag is the official way of marking a release, so the tarballs provided
automatically by the cgit frontend are official release tarballs.
\ Contributing Patches
---------------------
If you want to contribute patches, please subscribe to the piglit
mailing list (http://lists.freedesktop.org/mailman/listinfo/piglit)
and then send them to piglit@lists.freedesktop.org using "git
send-email". One of the core piglit developers should respond with
comments and suggested improvements. The piglit mailing list is also
a good place for general discussion about piglit development, such as
future plans for the project, and coordinating work between
developers.
Note that Piglit patches use the terms "Reviewed-by", "Tested-by", and
"Acked-by" in the same way as they are used for Linux kernel patches
(see https://www.kernel.org/doc/Documentation/SubmittingPatches). You
are also welcome to add a "Signed-off-by" line to your patch, but it
is not required.
For developers who are new to piglit: when submitting a patch, it is
helpful to add a note (after the "---" line in the patch file)
indicating that you are new to the project and don't have commit
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:
http://www.freedesktop.org/wiki/AccountRequests/
Please be patient--most of us develop graphics drivers (such as Mesa)
as our primary job, so we have limited time to respond to your patches
on the piglit mailing list. If your patch hasn't received a reply in
a week, send a follow-up email to make sure we haven't missed it. If
you have questions that are better discussed in real time, many piglit
developers can also be found in the #dri-devel channel on Freenode
IRC.
Piglit
------
1. About
2. Setup
3. How to run tests
4. How to write tests
5. Todo
1. About
--------
Piglit is a collection of automated tests for OpenGL implementations.
The goal of Piglit is to help improve the quality of open source
OpenGL drivers by providing developers with a simple means to
perform regression tests.
The original tests have been taken from
- Glean ( http://glean.sf.net/ ) and
- Mesa ( http://www.mesa3d.org/ )
2. Setup
--------
First of all, you need to make sure that the following are installed:
- Python 2.4 or greater
- cmake (http://www.cmake.org)
- GL, glu and glut libraries and development packages (i.e. headers)
- X11 libraries and development packages (i.e. headers)
- libtiff
Now configure the build system:
</