Commit 538874b4 authored by Nicolai Hähnle's avatar Nicolai Hähnle
Browse files

Merge commit 'anholt/master'

Conflicts:

	tests/glean/tblend.cpp
parents a706081c 42b9bf92
bin
CMakeFiles
Makefile
cmake_install.cmake
\ No newline at end of file
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......@@ -54,8 +54,8 @@ class GleanTest(Test):
checkDir(gleanResultDir()+self.name, False)
glean = subprocess.Popen(
[gleanExecutable(), "-o", "-r", gleanResultDir()+self.name,
"--ignore-prereqs",
[gleanExecutable(), "-r", gleanResultDir()+self.name,
"-o",
"-v", "-v", "-v",
"-t", "+"+self.name] + GleanTest.globalParams,
stdout=subprocess.PIPE,
......
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......
#!/usr/bin/python
#!/usr/bin/env python
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
......@@ -266,7 +266,7 @@ def main():
dirname = summaryDir + '/' + tr.codename
core.checkDir(dirname, False)
for test in summary.allTests():
filename = dirname + testPathToHtmlFilename(test.path)
filename = dirname + '/' + testPathToHtmlFilename(test.path)
writeResultHtml(test, test.results[j], filename)
writefile(summaryDir + '/result.css', readfile(templatedir + 'result.css'))
......
add_subdirectory (util)
add_subdirectory (bugs)
add_subdirectory (glean)
add_subdirectory (mesa)
add_subdirectory (shaders)
add_subdirectory (texturing)
......@@ -8,46 +8,23 @@ from framework.core import *
from framework.exectest import *
from framework.gleantest import *
######
# Glean sub-tests
glean_fragprog1 = Group()
out,err = subprocess.Popen(
[gleanExecutable(), "-t", "+fragProg1", "--listdetails"],
stdout=subprocess.PIPE
).communicate()
st = 0
for line in out.split('\n'):
if st == 0:
if line == "DETAILS for fragProg1":
st = 1
elif st == 1:
if line == "END DETAILS":
break
line = line.strip()
line = filter(lambda s: s.isalnum() or s in ' ()-_', line)
t = GleanTest('fragProg1')
t.env['GLEAN_FRAGPROG'] = line
glean_fragprog1[line] = t
######
# Collecting all tests
profile = TestProfile()
glean = Group()
glean['basic'] = GleanTest('basic')
glean['api2'] = GleanTest('api2')
glean['makeCurrent'] = GleanTest('makeCurrent')
glean['blendFunc'] = GleanTest('blendFunc')
glean['depthStencil'] = GleanTest('depthStencil')
glean['fpexceptions'] = GleanTest('fpexceptions')
glean['fragProg1'] = GleanTest('fragProg1') # also add entire tests, because of interdependency bugs that only occur when several different FPs are used
glean['fragProg1'] = GleanTest('fragProg1')
glean['getString'] = GleanTest('getString')
glean['glsl1'] = GleanTest('glsl1')
glean['logicOp'] = GleanTest('logicOp')
glean['maskedClear'] = GleanTest('maskedClear')
glean['occluquery'] = GleanTest('occluQry')
glean['orthoPosRandTris'] = GleanTest('orthoPosRandTris')
glean['orthoPosRandRects'] = GleanTest('orthoPosRandRects')
glean['orthoPosTinyQuads'] = GleanTest('orthoPosTinyQuads')
......@@ -55,9 +32,11 @@ glean['orthoPosHLines'] = GleanTest('orthoPosHLines')
glean['orthoPosVLines'] = GleanTest('orthoPosVLines')
glean['orthoPosPoints'] = GleanTest('orthoPosPoints')
glean['paths'] = GleanTest('paths')
glean['pbo'] = GleanTest('pbo')
glean['polygonOffset'] = GleanTest('polygonOffset')
glean['pixelFormats'] = GleanTest('pixelFormats')
glean['pointAtten'] = GleanTest('pointAtten')
glean['pointSprite'] = GleanTest('pointSprite')
glean['exactRGBA'] = GleanTest('exactRGBA')
glean['readPixSanity'] = GleanTest('readPixSanity')
glean['rgbTriStrip'] = GleanTest('rgbTriStrip')
......@@ -81,16 +60,21 @@ shaders['fp-lit-mask'] = PlainExecTest([testBinDir + 'fp-lit-mask', '-auto'])
shaders['fp-fragment-position'] = PlainExecTest([testBinDir + 'fp-fragment-position', '-auto'])
shaders['fp-kil'] = PlainExecTest([testBinDir + 'fp-kil', '-auto'])
shaders['fp-incomplete-tex'] = PlainExecTest([testBinDir + 'fp-incomplete-tex', '-auto'])
shaders['glean-fragProg1'] = glean_fragprog1
shaders['vp-bad-program'] = PlainExecTest([testBinDir + 'vp-bad-program', '-auto'])
bugs = Group()
bugs['fdo9833'] = PlainExecTest([testBinDir + 'fdo9833', '-auto'])
bugs['fdo10370'] = PlainExecTest([testBinDir + 'fdo10370', '-auto'])
bugs['fdo14575'] = PlainExecTest([testBinDir + 'fdo14575', '-auto'])
texturing = Group()
texturing['cubemap'] = PlainExecTest([testBinDir + 'cubemap', '-auto'])
profile.tests['bugs'] = bugs
profile.tests['glean'] = glean
profile.tests['mesa'] = mesa
profile.tests['shaders'] = shaders
profile.tests['texturing'] = bugs
#############
# Some Mesa diagnostic messages that we should probably ignore
......@@ -100,3 +84,9 @@ Test.ignoreErrors.append(re.compile("Mesa: CPU.*"))
Test.ignoreErrors.append(re.compile("Mesa: .*cpu detected."))
Test.ignoreErrors.append(re.compile("Mesa: Test.*"))
Test.ignoreErrors.append(re.compile("Mesa: Yes.*"))
Test.ignoreErrors.append(re.compile("libGL: XF86DRIGetClientDriverName.*"))
Test.ignoreErrors.append(re.compile("libGL: OpenDriver: trying.*"))
Test.ignoreErrors.append(re.compile("drmOpen.*"))
Test.ignoreErrors.append(re.compile("Mesa: Not testing OS support.*"))
Test.ignoreErrors.append(re.compile("Mesa: User error:.*"))
......@@ -19,3 +19,4 @@ link_libraries (
add_executable (fdo9833 fdo9833.c)
add_executable (fdo10370 fdo10370.c)
add_executable (fdo14575 fdo14575.c)
/*
* Copyright © 2007 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.
*
* Authors:
* Eric Anholt <eric@anholt.net>
*
*/
/**
* @file fdo14575.c
*
* Tests that the driver doesn't fail when deleting a mapped buffer object.
*/
#define GL_GLEXT_PROTOTYPES
#include "GL/glut.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
static int Automatic = 0;
#define WIN_WIDTH 128
#define WIN_HEIGHT 128
int main(int argc, char**argv)
{
GLfloat data = 1.0;
GLfloat *v;
int buf;
glutInit(&argc, argv);
if (argc == 2 && !strcmp(argv[1], "-auto"))
Automatic = 1;
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (WIN_WIDTH, WIN_HEIGHT);
glutInitWindowPosition (100, 100);
glutCreateWindow ("fdo10370");
glGenBuffersARB(1, &buf);
/* First, do a normal buffer create/data/delete */
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, &data, GL_STATIC_DRAW_ARB);
glDeleteBuffersARB(1, &buf);
assert(glGetError() == 0);
/* Then, another normal path: create, map, write, unmap, delete */
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL, GL_STATIC_DRAW_ARB);
v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
*v = data;
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
glDeleteBuffersARB(1, &buf);
assert(glGetError() == 0);
/* Then, do the failing path: create, map, delete */
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, 4, NULL, GL_STATIC_DRAW_ARB);
v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
*v = data;
glDeleteBuffersARB(1, &buf);
assert(glGetError() == 0);
if (Automatic)
printf("PIGLIT: {'result': 'pass' }\n");
return 0;
}
......@@ -16,6 +16,7 @@ add_executable (glean
misc.cpp
options.cpp
rc.cpp
tapi2.cpp
tbasic.cpp
tbasicperf.cpp
tbinding.cpp
......@@ -26,14 +27,18 @@ add_executable (glean
tfpexceptions.cpp
tfragprog1.cpp
tgetstr.cpp
tglsl1.cpp
tlogicop.cpp
tmaskedclear.cpp
tmultitest.cpp
toccluqry.cpp
torthpos.cpp
tpaths.cpp
tpbo.cpp
tpgos.cpp
tpixelformats.cpp
tpointatten.cpp
tpointsprite.cpp
treadpix.cpp
treadpixperf.cpp
trgbtris.cpp
......
// BEGIN_COPYRIGHT -*- glean -*-
//
//
// Copyright (C) 1999 Allen Akin All Rights Reserved.
//
//
// 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
......@@ -10,11 +10,11 @@
// 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
......@@ -23,7 +23,7 @@
// 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.
//
//
// END_COPYRIGHT
......@@ -75,7 +75,7 @@ Environment::Environment(Options& opt):
}
// If comparing previous runs, make a token attempt to verify
// that the two databases exist.
} else if (opt.mode == Options::compare) {
} else {
struct stat s;
if (stat(opt.db1Name.c_str(), &s) || !S_ISDIR(s.st_mode))
throw DBCantOpen(opt.db1Name);
......@@ -99,8 +99,8 @@ Environment::Environment(Options& opt):
}
// If comparing previous runs, make a token attempt to verify
// that the two databases exist.
} else if (opt.mode == Options::compare) {
struct _stat s;
} else {
struct _stat s;
if (_stat(opt.db1Name.c_str(), &s) || !(s.st_mode & _S_IFDIR))
throw DBCantOpen(opt.db1Name);
......
......@@ -99,6 +99,16 @@ haveExtensions(const char* required) {
return haveAll;
} // haveExtensions
float
getVersion()
{
const GLubyte *version = glGetString(GL_VERSION);
// we rely on atof() stopping parsing at whitespace
return atof((const char *) version);
}
///////////////////////////////////////////////////////////////////////////////
// getProcAddress: Get address of an OpenGL or window-system-binding function.
// This belongs here, rather than as a member of RenderingContext, because
......
......@@ -59,6 +59,9 @@ inline bool haveExtension(const char* name) {
// RenderingContext.
void (*getProcAddress(const char* name))();
// Return GL renderer version as a float (1.1, 2.0, etc)
float getVersion();
// Check for OpenGL errors and log any that have occurred:
void logGLErrors(Environment& env);
......
// BEGIN_COPYRIGHT -*- glean -*-
//
//
// Copyright (C) 1999 Allen Akin All Rights Reserved.
//
//
// 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
......@@ -10,11 +10,11 @@
// 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
......@@ -23,7 +23,7 @@
// 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.
//
//
// END_COPYRIGHT
......@@ -80,8 +80,6 @@ main(int argc, char* argv[]) {
} else if (!strcmp(argv[i], "-o")
|| !strcmp(argv[i], "--overwrite")) {
o.overwrite = true;
} else if (!strcmp(argv[i], "--ignore-prereqs")) {
o.ignorePrereqs = true;
} else if (!strcmp(argv[i], "-c")
|| !strcmp(argv[i], "--compare")) {
o.mode = Options::compare;
......@@ -98,8 +96,6 @@ main(int argc, char* argv[]) {
selectTests(o, allTestNames, argc, argv, i);
} else if (!strcmp(argv[i], "--listtests")) {
o.mode = Options::listtests;
} else if (!strcmp(argv[i], "--listdetails")) {
o.mode = Options::listdetails;
# if defined(__X11__)
} else if (!strcmp(argv[i], "-display")
|| !strcmp(argv[i], "--display")) {
......@@ -156,14 +152,6 @@ main(int argc, char* argv[]) {
}
break;
}
case Options::listdetails:
{
for (Test* t = Test::testList; t; t = t->nextTest)
if (binary_search(o.selectedTests.begin(),
o.selectedTests.end(), t->name))
t->details(e);
break;
}
default:
cerr << "Bad run mode in main()\n";
break;
......@@ -332,10 +320,8 @@ usage(char* command) {
" (-o|--overwrite) # overwrite existing results database\n"
" --visuals 'filter-string' # select subset of visuals (FBConfigs,\n"
" # pixel formats) to test\n"
" --ignore-prereqs # do not force prerequisite tests\n"
" (-t|--tests) {(+|-)test} # choose tests to include (+) or exclude (-)\n"
" --listtests # list test names and exit\n"
" --listdetails # list details of the selected tests and exit\n"
" --help # display usage information\n"
#if defined(__X11__)
" -display X11-display-name # select X11 display to use\n"
......
// BEGIN_COPYRIGHT -*- glean -*-
//
//
// Copyright (C) 1999 Allen Akin All Rights Reserved.
//
//
// 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
......@@ -10,11 +10,11 @@
// 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
......@@ -23,7 +23,7 @@
// 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.
//
//
// END_COPYRIGHT
......@@ -48,7 +48,6 @@ Options::Options() {
visFilter = "1";
selectedTests.resize(0);
overwrite = false;
ignorePrereqs = false;
# if defined(__X11__)
{
char* display = getenv("DISPLAY");
......
// BEGIN_COPYRIGHT -*- glean -*-
//
//
// Copyright (C) 1999 Allen Akin All Rights Reserved.
//
//
// 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
......@@ -10,11 +10,11 @@
// 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
......@@ -23,7 +23,7 @@
// 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.
//
//
// END_COPYRIGHT
......@@ -38,7 +38,7 @@
// We collect this information for two reasons. First, it allows the
// (relatively) large number of parameters needed for creating an
// Environment to be passed cleanly to Environment's constructor.
// Environment to be passed cleanly to Environment's constructor.
// Second, it allows the process of gathering parameters (by parsing a
// command line, running a set of GUI dialogs, etc.) to be separated
// from the creation of the Environment.
......@@ -57,7 +57,7 @@ namespace GLEAN {
class Options {
public:
typedef enum {notSet, run, compare, listtests, listdetails} RunMode;
typedef enum {notSet, run, compare, listtests} RunMode;
RunMode mode; // Indicates whether we're generating
// results, or comparing two previous runs.
......@@ -82,7 +82,6 @@ class Options {
// Sorted list of tests to be executed.
bool overwrite; // overwrite old results database if exists
bool ignorePrereqs; // ignore prerequisite tests
#if defined(__X11__)
string dpyName; // Name of the X11 display providing the
// OpenGL implementation to be tested.
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment