.gitignore | 5 CMakeLists.txt | 52 SConstruct | 144 bin/confdiff.sh | 48 bin/config.guess | 1555 - bin/config.sub | 1685 - bin/install-sh | 1 bin/installmesa | 74 bin/minstall | 93 bin/mklib | 1027 bin/version.mk | 17 common.py | 64 configs/.gitignore | 2 configs/aix | 30 configs/aix-64 | 27 configs/aix-64-static | 25 configs/aix-gcc | 23 configs/aix-static | 25 configs/autoconf.in | 184 configs/beos | 104 configs/bluegene-osmesa | 33 configs/bluegene-xlc-osmesa | 29 configs/catamount-osmesa-pgi | 32 configs/config.mgw | 42 configs/darwin | 60 configs/darwin-fat-32bit | 7 configs/darwin-fat-all | 7 configs/default | 155 configs/freebsd | 31 configs/freebsd-dri | 52 configs/freebsd-dri-amd64 | 10 configs/freebsd-dri-x86 | 13 configs/hpux10 | 14 configs/hpux10-gcc | 20 configs/hpux10-static | 30 configs/hpux11-32 | 30 configs/hpux11-32-static | 27 configs/hpux11-32-static-nothreads | 26 configs/hpux11-64 | 31 configs/hpux11-64-static | 27 configs/hpux11-ia64 | 30 configs/hpux11-ia64-static | 27 configs/hpux9 | 16 configs/hpux9-gcc | 14 configs/irix6-64 | 17 configs/irix6-64-static | 26 configs/irix6-n32 | 17 configs/irix6-n32-static | 25 configs/irix6-o32 | 18 configs/irix6-o32-static | 25 configs/linux | 38 configs/linux-alpha | 22 configs/linux-alpha-static | 31 configs/linux-cell | 71 configs/linux-cell-debug | 10 configs/linux-debug | 9 configs/linux-dri | 72 configs/linux-dri-debug | 16 configs/linux-dri-ppc | 17 configs/linux-dri-x86 | 13 configs/linux-dri-x86-64 | 24 configs/linux-dri-xcb | 55 configs/linux-egl | 57 configs/linux-fbdev | 19 configs/linux-i965 | 9 configs/linux-ia64-icc | 21 configs/linux-ia64-icc-static | 27 configs/linux-icc | 22 configs/linux-icc-static | 27 configs/linux-indirect | 52 configs/linux-llvm | 44 configs/linux-llvm-debug | 12 configs/linux-opengl-es | 28 configs/linux-osmesa | 28 configs/linux-osmesa-static | 37 configs/linux-osmesa16 | 31 configs/linux-osmesa16-static | 32 configs/linux-osmesa32 | 31 configs/linux-ppc | 9 configs/linux-ppc-static | 15 configs/linux-profile | 8 configs/linux-sparc | 9 configs/linux-sparc5 | 7 configs/linux-static | 26 configs/linux-ultrasparc | 7 configs/linux-x86 | 11 configs/linux-x86-32 | 7 configs/linux-x86-64 | 14 configs/linux-x86-64-debug | 8 configs/linux-x86-64-profile | 8 configs/linux-x86-64-static | 27 configs/linux-x86-debug | 9 configs/linux-x86-profile | 8 configs/linux-x86-static | 26 configs/netbsd | 17 configs/openbsd | 22 configs/osf1 | 16 configs/osf1-static | 17 configs/solaris-x86 | 18 configs/solaris-x86-gcc | 21 configs/solaris-x86-gcc-static | 28 configs/sunos4 | 12 configs/sunos4-gcc | 19 configs/sunos4-static | 25 configs/sunos5 | 18 configs/sunos5-64-gcc | 11 configs/sunos5-gcc | 40 configs/sunos5-smp | 19 configs/sunos5-v8 | 18 configs/sunos5-v8-static | 16 configs/sunos5-v9 | 23 configs/sunos5-v9-cc-g++ | 35 configs/sunos5-v9-static | 18 configs/ultrix-gcc | 25 configure.ac | 13 doxygen/.gitignore | 21 doxygen/Makefile | 32 doxygen/README | 10 doxygen/common.doxy | 1153 doxygen/core_subset.doxy | 226 doxygen/doxy.bat | 19 doxygen/gallium.doc | 322 doxygen/gallium.doxy | 1303 - doxygen/glapi.doxy | 49 doxygen/header.html | 17 doxygen/header_subset.html | 11 doxygen/main.doxy | 50 doxygen/math.doxy | 49 doxygen/math_subset.doxy | 177 doxygen/radeon_subset.doxy | 203 doxygen/shader.doxy | 49 doxygen/swrast.doxy | 48 doxygen/swrast_setup.doxy | 49 doxygen/tnl.doxy | 50 doxygen/tnl_dd.doxy | 49 doxygen/vbo.doxy | 50 include/EGL/egl.h | 329 include/EGL/eglext.h | 234 include/EGL/eglplatform.h | 110 include/GL/gl.h | 2241 - include/GL/gl_mangle.h | 1985 - include/GL/glew.h |13369 ----------- include/GL/glext.h |10081 -------- include/GL/glfbdev.h | 149 include/GL/glu.h | 353 include/GL/glu_mangle.h | 86 include/GL/glut.h | 665 include/GL/glutf90.h | 81 include/GL/glx.h | 542 include/GL/glx_mangle.h | 82 include/GL/glxew.h | 1446 - include/GL/glxext.h | 948 include/GL/internal/dri_interface.h | 841 include/GL/internal/glcore.h | 181 include/GL/internal/sarea.h | 92 include/GL/mesa_wgl.h | 121 include/GL/osmesa.h | 289 include/GL/vms_x_fix.h | 1224 - include/GL/wglew.h | 1247 - include/GL/wglext.h | 869 include/GL/wmesa.h | 141 include/GLES/egl.h | 6 include/GLES/egltypes.h | 45 include/GLES/gl.h | 797 include/GLES/glext.h | 607 include/GLES/glplatform.h | 76 include/GLES2/gl2.h | 652 include/GLES2/gl2ext.h | 388 include/GLES2/gl2platform.h | 72 include/KHR/khrplatform.h | 273 include/VG/openvg.h | 686 include/VG/vgext.h | 233 include/VG/vgplatform.h | 111 include/VG/vgu.h | 130 include/c99/stdbool.h | 46 include/c99/stdint.h | 119 index.html | 110 scons/crossmingw.py | 187 scons/custom.py | 169 scons/dxsdk.py | 73 scons/fixes.py | 27 scons/gallium.py | 481 scons/mslib_sa.py | 137 scons/mslink_sa.py | 246 scons/msvc_sa.py | 246 scons/python.py | 72 scons/udis86.py | 42 scons/wcesdk.py | 176 scons/winddk.py | 148 scons/winsdk.py | 131 scons/x11.py | 52 src/CMakeLists.txt | 29 src/SConscript | 54 src/demos/.gitignore | 1 src/demos/CMakeLists.txt | 90 src/demos/Makefile.am | 2 src/demos/SConscript | 81 src/demos/arbocclude2.c | 171 src/demos/fbo_firecube.c | 1 src/demos/fire.c | 1 src/demos/geartrain.c | 175 src/demos/ipers.c | 2 src/demos/isosurf.c | 4 src/demos/lodbias.c | 2 src/demos/pixeltest.c | 466 src/demos/ray.c | 1 src/demos/renormal.c | 1 src/demos/spriteblast.c | 125 src/demos/stex3d.c | 7 src/demos/teapot.c | 1 src/demos/terrain.c | 1 src/demos/tessdemo.c | 44 src/demos/texenv.c | 1 src/demos/textures.c | 3 src/demos/tunnel.c | 1 src/demos/tunnel2.c | 1 src/egl/CMakeLists.txt | 2 src/egl/eglut/CMakeLists.txt | 7 src/egl/eglut/eglut.c | 25 src/egl/eglut/eglut.h | 25 src/egl/eglut/eglut_screen.c | 25 src/egl/eglut/eglut_x11.c | 36 src/egl/eglut/eglutint.h | 25 src/egl/opengl/.gitignore | 1 src/egl/opengl/CMakeLists.txt | 15 src/egl/opengl/Makefile.am | 17 src/egl/opengl/eglkms.c | 253 src/egl/opengl/peglgears.c | 15 src/egl/opengl/xeglgears.c | 23 src/egl/opengles1/.gitignore | 1 src/egl/opengles1/Makefile.am | 5 src/egl/opengles1/clear.c | 95 src/egl/opengles1/es1_info.c | 6 src/egl/opengles1/texture_from_pixmap.c | 21 src/egl/opengles1/tri.c | 2 src/egl/opengles2/.gitignore | 2 src/egl/opengles2/Makefile.am | 9 src/egl/opengles2/es2gears.c | 658 src/egl/opengles2/es2tri.c | 516 src/egl/opengles2/tri.c | 516 src/egl/openvg/.gitignore | 7 src/egl/openvg/Makefile.am | 13 src/egl/openvg/lion.c | 22 src/egl/openvg/text.c | 430 src/egl/openvg/trivial/Makefile.am | 13 src/egl/openvg/trivial/blend.c | 277 src/egl/openvg/trivial/color_transform.c | 136 src/egl/openvg/trivial/eglcommon.c | 9 src/egl/openvg/trivial/eglcommon.h | 1 src/egl/openvg/trivial/image.c | 81 src/egl/openvg/trivial/layer.c | 109 src/egl/openvg/trivial/mask_render.c | 134 src/egl/openvg/trivial/paint.c | 155 src/fp/CMakeLists.txt | 41 src/fp/SConscript | 27 src/fpglsl/CMakeLists.txt | 34 src/fpglsl/SConscript | 13 src/fpglsl/fp-tri.c | 14 src/glew/LICENSE.txt | 73 src/glew/glew.c |14320 ------------ src/glew/glewinfo.c | 8441 ------- src/glew/visualinfo.c | 1173 src/glsl/.gitignore | 1 src/glsl/SConscript | 40 src/glsl/bezier.c | 1 src/glsl/brick.c | 16 src/glsl/multitex.c | 6 src/glsl/pointcoord.c | 13 src/glsl/samplers.c | 4 src/glsl/shadow_sampler.c | 14 src/glsl/texdemo1.c | 6 src/gs/.gitignore | 1 src/gs/CMakeLists.txt | 34 src/gs/SConscript | 13 src/images/CMakeLists.txt | 3 src/images/SConscript | 10 src/objviewer/CMakeLists.txt | 31 src/objviewer/glmdraw.c | 2 src/objviewer/objview.c | 6 src/perf/CMakeLists.txt | 39 src/perf/Makefile.am | 4 src/perf/SConscript | 25 src/perf/glslstateschange.c | 272 src/perf/glslstateschange1.frag | 19 src/perf/glslstateschange1.vert | 14 src/perf/glslstateschange2.frag | 17 src/perf/glslstateschange2.vert | 14 src/redbook/CMakeLists.txt | 105 src/redbook/SConscript | 86 src/redbook/cubemap.c | 1 src/redbook/multisamp.c | 1 src/redbook/quadric.c | 10 src/redbook/surfpoints.c | 14 src/redbook/tess.c | 42 src/redbook/tesswind.c | 28 src/redbook/trim.c | 10 src/samples/CMakeLists.txt | 78 src/samples/SConscript | 40 src/samples/nurb.c | 11 src/samples/quad.c | 11 src/tests/.gitignore | 2 src/tests/CMakeLists.txt | 166 src/tests/Makefile.am | 3 src/tests/SConscript | 124 src/tests/bumpmap.c | 2 src/tests/floattex.c | 4 src/tests/fog.c | 200 src/tests/mipmap_tunnel.c | 250 src/tests/occlude.c | 2 src/tests/prog_parameter.c | 31 src/tests/shader_api.c | 6 src/tests/step.c | 180 src/tests/texdown.c | 1 src/tools/trace/gltrace.py | 12 src/trivial/.gitignore | 4 src/trivial/CMakeLists.txt | 198 src/trivial/Makefile.am | 5 src/trivial/SConscript | 174 src/trivial/clear-color.c | 128 src/trivial/clear.c | 128 src/trivial/drawelements-large.c | 121 src/trivial/line-smooth.c | 1 src/trivial/line-xor.c | 128 src/trivial/point-sprite.c | 1 src/trivial/quad-tex-2d.c | 1 src/trivial/quad-tex-alpha.c | 1 src/trivial/tri-alpha-tex.c | 1 src/trivial/tri-clear.c | 2 src/trivial/tri-edgeflag-array.c | 119 src/trivial/tri-tex-1d.c | 186 src/trivial/tri-tex.c | 1 src/util/CMakeLists.txt | 13 src/util/SConscript | 15 src/util/shaderutil.c | 127 src/util/shaderutil.h | 23 src/vp/CMakeLists.txt | 34 src/vp/SConscript | 15 src/vpglsl/CMakeLists.txt | 34 src/vpglsl/SConscript | 6 src/wgl/CMakeLists.txt | 17 src/wgl/Makefile.am | 4 src/wgl/SConscript | 27 src/wgl/sharedtex_mt.c | 565 src/wgl/sharedtex_mt/sharedtex_mt.c | 565 src/wgl/wglinfo.c | 5 src/wgl/wglthreads.c | 636 src/wgl/wglthreads/wglthreads.c | 636 src/xdemos/CMakeLists.txt | 73 src/xdemos/SConscript | 75 src/xdemos/glxinfo.c | 140 src/xdemos/glxswapcontrol.c | 8 src/xdemos/yuvrect_client.c | 8 windows/VC7/mesa/gdi/gdi.vcproj | 195 windows/VC7/mesa/glu/glu.vcproj | 766 windows/VC7/mesa/mesa.sln | 47 windows/VC7/mesa/mesa/mesa.vcproj | 1194 - windows/VC7/mesa/osmesa/osmesa.vcproj | 182 windows/VC7/progs/glut/glut.vcproj | 322 windows/VC7/progs/progs.sln | 29 windows/VC7/progs/wgl/sharedtex_mt.vcproj | 132 windows/VC7/progs/wgl/wglthreads.vcproj | 132 windows/VC8/mesa/.gitignore | 30 windows/VC8/mesa/gdi/gdi.vcproj | 445 windows/VC8/mesa/glsl_apps_compile/glsl_apps_compile.vcproj | 305 windows/VC8/mesa/glu/glu.vcproj | 1202 - windows/VC8/mesa/mesa.sln | 77 windows/VC8/mesa/mesa/mesa.vcproj | 2434 -- windows/VC8/mesa/osmesa/osmesa.vcproj | 413 windows/VC8/progs/.gitignore | 17 windows/VC8/progs/demos/gears.vcproj | 409 windows/VC8/progs/glut/glut.vcproj | 625 windows/VC8/progs/progs.sln | 38 372 files changed, 7943 insertions(+), 92131 deletions(-)
New commits: commit d8f7d6bac9415581c02b18ebb462d3d9951fe5b4 Author: Jure Repinc <[email protected]> Date: Wed Jan 26 02:31:52 2011 +0100 egl/opengl: fixed linking of eglgears_* with libm diff --git a/src/egl/opengl/CMakeLists.txt b/src/egl/opengl/CMakeLists.txt index ede9ec3..3a012e1 100644 --- a/src/egl/opengl/CMakeLists.txt +++ b/src/egl/opengl/CMakeLists.txt @@ -6,10 +6,10 @@ add_executable(eglinfo eglinfo.c) target_link_libraries(eglinfo ${EGL_egl_LIBRARY}) add_executable(eglgears_screen eglgears.c) -target_link_libraries(eglgears_screen ${EGL_egl_LIBRARY} eglut_screen) +target_link_libraries(eglgears_screen ${EGL_egl_LIBRARY} eglut_screen m) if(X11_FOUND) add_executable(eglgears_x11 eglgears.c) - target_link_libraries(eglgears_x11 ${EGL_egl_LIBRARY} eglut_x11) + target_link_libraries(eglgears_x11 ${EGL_egl_LIBRARY} eglut_x11 m) endif(X11_FOUND) commit c1be1ce356e9cdedec558c503d6c74e6e1913d9f Author: Marek Olšák <[email protected]> Date: Tue Jan 25 13:42:16 2011 +0100 tri-clear: fix redrawing diff --git a/src/trivial/tri-clear.c b/src/trivial/tri-clear.c index e52ed81..df3616e 100644 --- a/src/trivial/tri-clear.c +++ b/src/trivial/tri-clear.c @@ -42,7 +42,6 @@ static void Init(void) fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); fflush(stderr); - glClearColor(0.0, 0.0, 1.0, 0.0); } static void Reshape(int width, int height) @@ -71,6 +70,7 @@ static void Key(unsigned char key, int x, int y) static void Draw(void) { + glClearColor(0.0, 0.0, 1.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_TRIANGLES); commit 049ab345b8da859f1853017f2d33d012c5f4b83b Author: Jakob Bornecrantz <[email protected]> Date: Mon Jan 24 05:12:41 2011 +0100 tests: Add application to step various gl operations diff --git a/src/tests/.gitignore b/src/tests/.gitignore index b6d112e..852ba52 100644 --- a/src/tests/.gitignore +++ b/src/tests/.gitignore @@ -83,6 +83,7 @@ stencilreaddraw stencil_twoside stencilwrap stencil_wrap +step streaming_rect subtex subtexrate diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index b998a61..d807c9b 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -100,6 +100,7 @@ set (targets shader_api stencilreaddraw stencilwrap + step streaming_rect subtex subtexrate diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 6baa94f..e650b62 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -127,6 +127,7 @@ noinst_PROGRAMS = \ sharedtex \ stencilreaddraw \ stencilwrap \ + step \ streaming_rect \ subtex \ subtexrate \ diff --git a/src/tests/step.c b/src/tests/step.c new file mode 100644 index 0000000..c6a317e --- /dev/null +++ b/src/tests/step.c @@ -0,0 +1,180 @@ +/* + * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the name of + * Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF + * ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <GL/glut.h> + + +#define CI_OFFSET_1 16 +#define CI_OFFSET_2 32 + + +GLenum doubleBuffer = 1; +int win; + +static void Init(void) +{ + fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); + fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); + fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); + fflush(stderr); + + glClearColor(0.3, 0.1, 0.3, 0.0); +} + +static void Reshape(int width, int height) +{ + glViewport(0, 0, (GLint)width, (GLint)height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); + glMatrixMode(GL_MODELVIEW); +} + +static void Clear(void) +{ + fprintf(stderr, "::clearing\n"); + fflush(stderr); + + glClear(GL_COLOR_BUFFER_BIT); +} + +static void DrawTri(void) +{ + fprintf(stderr, "::drawing - tri\n"); + fflush(stderr); + + glBegin(GL_TRIANGLES); + glColor3f(.8,0,0); + glVertex3f(-0.9, -0.9, -30.0); + glColor3f(0,.9,0); + glVertex3f( 0.9, -0.9, -30.0); + glColor3f(0,0,.7); + glVertex3f( 0.0, 0.9, -30.0); + glEnd(); +} + +static void DrawClipTri(void) +{ + fprintf(stderr, "::drawing - tri clipped\n"); + fflush(stderr); + + glBegin(GL_TRIANGLES); + glColor3f(.8,0,0); + glVertex3f(-0.9, 0.9, -30.0); + glColor3f(0,.9,0); + glVertex3f( 0.9, 0.9, -30.0); + glColor3f(0,0,.7); + glVertex3f( 0.0, -1.9, -30.0); + glEnd(); +} + +static void Swap(void) +{ + fprintf(stderr, "::swapping\n"); + fflush(stderr); + + glutSwapBuffers(); +} + +static void Flush(void) +{ + fprintf(stderr, "::flush\n"); + fflush(stderr); + + glFlush(); +} + +static void Key(unsigned char key, int x, int y) +{ + switch (key) { + case 27: + glutDestroyWindow(win); + exit(0); + case 't': + DrawTri(); + break; + case 'T': + DrawClipTri(); + break; + case 'f': + Flush(); + break; + case 's': + Swap(); + Clear(); + break; + default: + return; + } +} + +static void Draw(void) +{ + Clear(); + DrawTri(); + DrawClipTri(); + Swap(); + Clear(); +} + +static void +Usage(void) +{ + printf("usage:\n"); + printf(" t/T draw a triangle (caps for clipped)\n"); + printf(" f flush\n"); + printf(" s swap\n"); +} + +int main(int argc, char **argv) +{ + GLenum type; + + glutInit(&argc, argv); + + glutInitWindowPosition(0, 0); + glutInitWindowSize(250, 250); + + type = GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE; + glutInitDisplayMode(type); + + win = glutCreateWindow(*argv); + if (!win) { + exit(1); + } + + Init(); + + Usage(); + + glutReshapeFunc(Reshape); + glutKeyboardFunc(Key); + glutDisplayFunc(Draw); + glutMainLoop(); + return 0; +} commit 5624e128ad48ae785cd0274acdb9c177b6959c67 Author: Alexandre Demers <[email protected]> Date: Thu Jan 20 18:36:32 2011 -0700 glxinfo: add -s flag to print one extension per line Signed-off-by: Brian Paul <[email protected]> diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c index e4ff3d5..c4e9861 100644 --- a/src/xdemos/glxinfo.c +++ b/src/xdemos/glxinfo.c @@ -110,7 +110,7 @@ struct visual_attribs * Print a list of extensions, with word-wrapping. */ static void -print_extension_list(const char *ext) +print_extension_list(const char *ext, Bool singleLine) { const char *indentString = " "; const int indent = 4; @@ -127,7 +127,7 @@ print_extension_list(const char *ext) if (ext[j] == ' ' || ext[j] == 0) { /* found end of an extension name */ const int len = j - i; - if (width + len > max) { + if ((!singleLine) && (width + len > max)) { /* start a new line */ printf("\n"); width = indent; @@ -148,8 +148,15 @@ print_extension_list(const char *ext) j++; if (ext[j] == 0) break; - printf(", "); - width += 2; + if (singleLine) { + printf("\n"); + width = indent; + printf("%s", indentString); + } + else { + printf(", "); + width += 2; + } } } j++; @@ -412,7 +419,7 @@ print_limits(const char *extensions) static void -print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) +print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits, Bool singleLine) { Window win; int attribSingle[] = { @@ -555,14 +562,14 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) printf("server glx vendor string: %s\n", serverVendor); printf("server glx version string: %s\n", serverVersion); printf("server glx extensions:\n"); - print_extension_list(serverExtensions); + print_extension_list(serverExtensions, singleLine); printf("client glx vendor string: %s\n", clientVendor); printf("client glx version string: %s\n", clientVersion); printf("client glx extensions:\n"); - print_extension_list(clientExtensions); + print_extension_list(clientExtensions, singleLine); printf("GLX version: %u.%u\n", glxVersionMajor, glxVersionMinor); printf("GLX extensions:\n"); - print_extension_list(glxExtensions); + print_extension_list(glxExtensions, singleLine); printf("OpenGL vendor string: %s\n", glVendor); printf("OpenGL renderer string: %s\n", glRenderer); printf("OpenGL version string: %s\n", glVersion); @@ -574,7 +581,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) #endif printf("OpenGL extensions:\n"); - print_extension_list(glExtensions); + print_extension_list(glExtensions, singleLine); if (limits) print_limits(glExtensions); } @@ -1201,7 +1208,7 @@ find_best_visual(Display *dpy, int scrnum) static void usage(void) { - printf("Usage: glxinfo [-v] [-t] [-h] [-i] [-b] [-display <dname>]\n"); + printf("Usage: glxinfo [-v] [-t] [-h] [-i] [-b] [-s] ][-display <dname>]\n"); printf("\t-v: Print visuals info in verbose form.\n"); printf("\t-t: Print verbose table.\n"); printf("\t-display <dname>: Print GLX visuals on specified server.\n"); @@ -1209,6 +1216,7 @@ usage(void) printf("\t-i: Force an indirect rendering context.\n"); printf("\t-b: Find the 'best' visual and print its number.\n"); printf("\t-l: Print interesting OpenGL limits.\n"); + printf("\t-s: Print a single extension per line.\n"); } @@ -1222,6 +1230,7 @@ main(int argc, char *argv[]) GLboolean findBest = GL_FALSE; GLboolean limits = GL_FALSE; Bool allowDirect = True; + Bool singleLine = False; int i; for (i = 1; i < argc; i++) { @@ -1248,6 +1257,9 @@ main(int argc, char *argv[]) usage(); return 0; } + else if(strcmp(argv[i], "-s") == 0) { + singleLine = True; + } else { printf("Unknown option `%s'\n", argv[i]); usage(); @@ -1272,7 +1284,7 @@ main(int argc, char *argv[]) print_display_info(dpy); for (scrnum = 0; scrnum < numScreens; scrnum++) { mesa_hack(dpy, scrnum); - print_screen_info(dpy, scrnum, allowDirect, limits); + print_screen_info(dpy, scrnum, allowDirect, limits, singleLine); printf("\n"); print_visual_info(dpy, scrnum, mode); #ifdef GLX_VERSION_1_3 commit 37abe2d093f455b593d113e0c26ff4fe961efd96 Author: Brian Paul <[email protected]> Date: Tue Jan 18 15:33:45 2011 -0700 egl: add compile-time extension checking, use eglGetProcAddress The GL_OES_EGL_image extension is not defined in all gl.h or glext.h files so we need a compile-time check. Also, use eglGetProcAddress() to get the function pointer at runtime in case libGL doesn't define it. diff --git a/src/egl/opengl/eglkms.c b/src/egl/opengl/eglkms.c index 4e398b7..54936cb 100644 --- a/src/egl/opengl/eglkms.c +++ b/src/egl/opengl/eglkms.c @@ -14,6 +14,10 @@ #include <unistd.h> #include <string.h> +#ifdef GL_OES_EGL_image +static PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES_func; +#endif + struct kms { drmModeConnector *connector; drmModeEncoder *encoder; @@ -179,6 +183,14 @@ int main(int argc, char *argv[]) eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx); +#ifdef GL_OES_EGL_image + glEGLImageTargetRenderbufferStorageOES_func = + (PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) + eglGetProcAddress("glEGLImageTargetRenderbufferStorageOES"); +#else + fprintf(stderr, "GL_OES_EGL_image not supported at compile time\n"); +#endif + glGenFramebuffers(1, &fb); glBindFramebuffer(GL_FRAMEBUFFER_EXT, fb); @@ -190,7 +202,11 @@ int main(int argc, char *argv[]) glGenRenderbuffers(1, &color_rb); glBindRenderbuffer(GL_RENDERBUFFER_EXT, color_rb); +#ifdef GL_OES_EGL_image glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER, image); +#else + fprintf(stderr, "GL_OES_EGL_image was not found at compile time\n"); +#endif glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, diff --git a/src/egl/opengl/xeglgears.c b/src/egl/opengl/xeglgears.c index 2401d07..65cf513 100644 --- a/src/egl/opengl/xeglgears.c +++ b/src/egl/opengl/xeglgears.c @@ -47,6 +47,10 @@ #include <EGL/eglext.h> +#ifdef GL_OES_EGL_image +static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES_func; +#endif + #define BENCHMARK @@ -396,6 +400,11 @@ egl_manager_new(EGLNativeDisplayType xdpy, const EGLint *attrib_list, return NULL; } +#ifdef GL_OES_EGL_image + glEGLImageTargetTexture2DOES_func = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) + eglGetProcAddress("glEGLImageTargetTexture2DOES"); +#endif + return eman; } @@ -913,7 +922,11 @@ main(int argc, char *argv[]) case GEARS_RENDERBUFFER: glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); - glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, eman->image); +#ifdef GL_OES_EGL_image + glEGLImageTargetTexture2DOES_func(GL_TEXTURE_2D, eman->image); +#else + fprintf(stderr, "GL_OES_EGL_image not found at compile time.\n"); +#endif break; case GEARS_PBUFFER_TEXTURE: glGenTextures(1, &texture); commit f61baefe2e9858b68fccd838dce644ab6ecc1e1e Author: Chia-I Wu <[email protected]> Date: Fri Jan 14 14:17:59 2011 +0800 egl/opengl: Use eglChooseConfig in peglgears. eglGetConfig might not return a config that supports pbuffer. diff --git a/src/egl/opengl/peglgears.c b/src/egl/opengl/peglgears.c index 212d1ac..30b6578 100644 --- a/src/egl/opengl/peglgears.c +++ b/src/egl/opengl/peglgears.c @@ -371,6 +371,7 @@ main(int argc, char *argv[]) EGLint numConfigs, i; EGLBoolean b; EGLDisplay d; + EGLint configAttribs[10]; EGLint screenAttribs[10]; GLboolean printInfo = GL_FALSE; EGLint width = 300, height = 300; @@ -398,7 +399,19 @@ main(int argc, char *argv[]) printf("peglgears: EGL version = %d.%d\n", major, minor); printf("peglgears: EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); - eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs); + i = 0; + configAttribs[i++] = EGL_RENDERABLE_TYPE; + configAttribs[i++] = EGL_OPENGL_BIT; + configAttribs[i++] = EGL_SURFACE_TYPE; + configAttribs[i++] = EGL_PBUFFER_BIT; + configAttribs[i++] = EGL_NONE; + + numConfigs = 0; + if (!eglChooseConfig(d, configAttribs, configs, MAX_CONFIGS, &numConfigs) || + !numConfigs) { + printf("peglgears: failed to choose a config\n"); + return 0; + } eglBindAPI(EGL_OPENGL_API); commit 014a0c44bd7656446df1b1f8f485bc14b7fd68eb Author: Jerome Glisse <[email protected]> Date: Tue Jan 11 16:45:14 2011 -0500 perf/glslstateschange: evaluate shader/texture state change performance Many GL applications change shader & bound texture btw draw operation, this test try to evaluate the speed of such change in the stack. Signed-off-by: Jerome Glisse <[email protected]> diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am index 789aeef..5b00c11 100644 --- a/src/perf/Makefile.am +++ b/src/perf/Makefile.am @@ -50,7 +50,8 @@ bin_PROGRAMS = \ swapbuffers \ teximage \ vbo \ - vertexrate + vertexrate \ + glslstateschange endif copytex_LDADD = libperf.la @@ -63,3 +64,4 @@ swapbuffers_LDADD = libperf.la teximage_LDADD = libperf.la vbo_LDADD = libperf.la vertexrate_LDADD = libperf.la +glslstateschange_LDADD = libperf.la ../util/libutil.la diff --git a/src/perf/glslstateschange.c b/src/perf/glslstateschange.c new file mode 100644 index 0000000..0ea8a7b --- /dev/null +++ b/src/perf/glslstateschange.c @@ -0,0 +1,272 @@ +/** + * Test states change when using shaders & textures. + * + * Copyright (C) 2008 Brian Paul All Rights Reserved. + * Copyright (C) 2011 Red Hat 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 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 + * BRIAN PAUL 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. + */ +#include <assert.h> +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <GL/glew.h> +#include <GL/glut.h> +#include "readtex.h" +#include "shaderutil.h" +#include "glmain.h" +#include "common.h" + +static const char *VertFile1 = "glslstateschange1.vert"; +static const char *FragFile1 = "glslstateschange1.frag"; +static const char *VertFile2 = "glslstateschange2.vert"; +static const char *FragFile2 = "glslstateschange2.frag"; +static struct uniform_info Uniforms1[] = { + { "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 }, + { "tex2", 1, GL_SAMPLER_2D, { 1, 0, 0, 0 }, -1 }, + { "UniV1", 1, GL_FLOAT_VEC4, { 0.8, 0.2, 0.2, 0 }, -1 }, + { "UniV2", 1, GL_FLOAT_VEC4, { 0.6, 0.6, 0.6, 0 }, -1 }, + END_OF_UNIFORMS -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

