Commit efd402e1 authored by Keith Whitwell's avatar Keith Whitwell

Merge commit 'origin/master' into gallium-resources

Conflicts:
	src/gallium/drivers/cell/ppu/cell_screen.c
	src/gallium/drivers/cell/ppu/cell_texture.c
	src/gallium/drivers/llvmpipe/lp_screen.c
	src/gallium/drivers/r300/r300_context.c
	src/gallium/drivers/r300/r300_render.c
	src/gallium/drivers/r300/r300_screen.c
	src/gallium/drivers/r300/r300_state.c
	src/gallium/drivers/r300/r300_texture.c
	src/gallium/drivers/r300/r300_transfer.c
	src/gallium/state_trackers/egl/common/egl_g3d.h
	src/gallium/state_trackers/egl/kms/native_kms.c
	src/gallium/state_trackers/egl/x11/native_dri2.c
	src/gallium/state_trackers/egl/x11/native_ximage.c
parents fec8a1db 54526154
......@@ -320,6 +320,8 @@ GALLIUM_FILES = \
$(DIRECTORY)/src/gallium/Makefile \
$(DIRECTORY)/src/gallium/Makefile.template \
$(DIRECTORY)/src/gallium/SConscript \
$(DIRECTORY)/src/gallium/targets/Makefile.dri \
$(DIRECTORY)/src/gallium/targets/Makefile.egl \
$(DIRECTORY)/src/gallium/*/Makefile \
$(DIRECTORY)/src/gallium/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/Makefile \
......@@ -407,14 +409,18 @@ DEMO_FILES = \
$(DIRECTORY)/progs/demos/*.cxx \
$(DIRECTORY)/progs/demos/*.dat \
$(DIRECTORY)/progs/demos/README \
$(DIRECTORY)/progs/egl/Makefile \
$(DIRECTORY)/progs/egl/*.[ch] \
$(DIRECTORY)/progs/es1/*/Makefile \
$(DIRECTORY)/progs/es1/*/*.[ch] \
$(DIRECTORY)/progs/es2/*/Makefile \
$(DIRECTORY)/progs/es2/*/*.[ch] \
$(DIRECTORY)/progs/openvg/*/Makefile \
$(DIRECTORY)/progs/openvg/*/*.[ch] \
$(DIRECTORY)/progs/egl/eglut/Makefile \
$(DIRECTORY)/progs/egl/eglut/*.[ch] \
$(DIRECTORY)/progs/egl/opengl/Makefile \
$(DIRECTORY)/progs/egl/opengl/*.[ch] \
$(DIRECTORY)/progs/egl/opengles1/Makefile \
$(DIRECTORY)/progs/egl/opengles1/*.[ch] \
$(DIRECTORY)/progs/egl/opengles2/Makefile \
$(DIRECTORY)/progs/egl/opengles2/*.[ch] \
$(DIRECTORY)/progs/egl/openvg/Makefile \
$(DIRECTORY)/progs/egl/openvg/*.[ch] \
$(DIRECTORY)/progs/egl/openvg/*/Makefile \
$(DIRECTORY)/progs/egl/openvg/*/*.[ch] \
$(DIRECTORY)/progs/fbdev/Makefile \
$(DIRECTORY)/progs/fbdev/glfbdevtest.c \
$(DIRECTORY)/progs/objviewer/*.[ch] \
......
......@@ -88,6 +88,8 @@ if drawllvm:
env.Tool('llvm')
if not env.has_key('LLVM_VERSION'):
drawllvm = False
if drawllvm:
env.Append(CFLAGS = ['-DDRAW_LLVM=1'])
# derived options
x86 = machine == 'x86'
......@@ -159,12 +161,9 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
])
if platform == 'darwin':
env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
env.Append(CPPPATH = ['/usr/X11R6/include'])
env.Append(LIBPATH = ['/usr/X11R6/lib'])
env.Append(LIBS = [
'm',
'pthread',
'expat',
'dl',
])
......@@ -182,16 +181,6 @@ if dri:
if drawllvm:
env.Append(CPPDEFINES = ['DRAW_LLVM'])
# libGL
if platform in ('linux', 'freebsd', 'darwin'):
env.Append(LIBS = [
'X11',
'Xext',
'Xxf86vm',
'Xdamage',
'Xfixes',
])
# for debugging
#print env.Dump()
......
......@@ -60,7 +60,6 @@ def AddOptions(opts):
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', default_platform,
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded')))
opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
opts.Add('toolchain', 'compiler toolchain', 'default')
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
......@@ -119,7 +119,7 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
X11_LIBS = -lX11
# Installation directories (for make install)
INSTALL_DIR = /usr/local
......
......@@ -52,7 +52,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
# Directories
SRC_DIRS := glx egl $(SRC_DIRS)
PROGRAM_DIRS := egl $(PROGRAM_DIRS)
PROGRAM_DIRS := egl/opengl $(PROGRAM_DIRS)
# EGL directories
EGL_DRIVERS_DIRS = glx
......
......@@ -48,7 +48,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
# Directories
SRC_DIRS = gallium mesa gallium/winsys gallium/targets glu egl
PROGRAM_DIRS = egl
PROGRAM_DIRS = egl/opengl
DRIVER_DIRS = dri
GALLIUM_WINSYS_DIRS = egl_drm
......
......@@ -7,7 +7,7 @@ CONFIG_NAME = linux-opengl-es
# Directories to build
LIB_DIR = lib
SRC_DIRS = egl glsl mesa/es gallium gallium/winsys gallium/targets
PROGRAM_DIRS = es1/screen es1/xegl es2/xegl
PROGRAM_DIRS = egl/opengles1 egl/opengles2
# egl st needs this
DEFINES += -DGLX_DIRECT_RENDERING
......
......@@ -954,7 +954,7 @@ if test "x$enable_egl" = xyes; then
fi
if test "$with_demos" = yes; then
PROGRAM_DIRS="$PROGRAM_DIRS egl"
PROGRAM_DIRS="$PROGRAM_DIRS egl/opengl"
fi
fi
AC_SUBST([EGL_LIB_DEPS])
......
......@@ -26,7 +26,7 @@ Packed depth/stencil formats DONE
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE
GL_EXT_texture_compression_rgtc not started
Red and red/green texture formats Ian?
Transform feedback (GL_EXT_transform_feedback) not started
Transform feedback (GL_EXT_transform_feedback) ~50% done
Vertex array objects (GL_APPLE_vertex_array_object) DONE
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started
glClearBuffer commands DONE, except for dispatch
......@@ -40,7 +40,7 @@ glBindBufferRange, glBindBufferBase commands not started
GL 3.1:
GLSL 1.30 and 1.40 not started
Instanced drawing (GL_ARB_draw_instanced) not started
Instanced drawing (GL_ARB_draw_instanced) ~50% done
Buffer copying (GL_ARB_copy_buffer) DONE
Primitive restart (GL_NV_primitive_restart) not started
16 vertex texture image units not started
......@@ -57,7 +57,7 @@ GLSL 1.50 not started
Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack)
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE
Frag shader coord (GL_ARB_fragment_coord_conventions) not started
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (swrast, gallium)
Provoking vertex (GL_ARB_provoking_vertex) DONE
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly?
Multisample textures (GL_ARB_texture_multisample) not started
......
......@@ -11,6 +11,14 @@
<H1>News</H1>
<h2>April 5, 2010</h2>
<p>
<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
release for a few critical issues in the 7.8 release.
</p>
<h2>March 28, 2010</h2>
<p>
<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
......
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.8.1 Release Notes / April, 5, 2010</H1>
<p>
Mesa 7.8.1 fixes a couple critical bugs in the recent Mesa 7.8 release. Even
though this is a bug fix release, given its proximity to the 7.8 release, a
new development release, it should also be considered new development release.
People who are concerned with stability and reliability should stick
with a previous release, such as 7.7.1, or wait for Mesa 7.8.2.
</p>
<p>
Mesa 7.8.1 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
62e8e47cbd63741b4bbe634dcdc8a56a MesaLib-7.8.1.tar.gz
25ec15f8e41fde6d206118cc786dbac4 MesaLib-7.8.1.tar.bz2
22b1153010ffdf513836ea9931159e80 MesaLib-7.8.1.zip
c9c0a830923d3820807a08c09d521b3e MesaDemos-7.8.1.tar.gz
9ef47f911869657c6bf2f43ebce86b61 MesaDemos-7.8.1.tar.bz2
93720605eb3f784f9bcc289a4dd2ff52 MesaDemos-7.8.1.zip
ed1d0b1e960afe6a3768eab747cbdbd3 MesaGLUT-7.8.1.tar.gz
6bae516a44c6d26ff3152c960ab648e7 MesaGLUT-7.8.1.tar.bz2
ba306f603ea73c30ee0e7efa14dc5581 MesaGLUT-7.8.1.zip
</pre>
<h2>New features</h2>
<p>None.</p>
<h2>Bug fixes</h2>
<ul>
<li>Fix incorrect enums for GLX_INTEL_swap_event by updating glxext.h to
version 27 from OpenGL.org.</li>
<li>Fix compilation errors on non-GLX_DIRECT_RENDERING builds.</li>
<li>Various fixes for building Mesa on OS X.</li>
<li>Pass GLX drawable ID to dri2InvalidateBuffers. Fixes bug #27190.</li>
</ul>
<h2>Changes</h2>
<p>None.</p>
</body>
</html>
......@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
......
This diff is collapsed.
......@@ -24,6 +24,7 @@ if progs_env['platform'] == 'windows':
if progs_env['platform'] == 'windows':
progs_env.Prepend(LIBS = ['glu32', 'opengl32'])
else:
progs_env.Tool('x11')
progs_env.Prepend(LIBS = ['GLU', 'GL'])
# Glut
......
/*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 2008 Brian Paul All Rights Reserved.
* Copyright (C) 2008 Jakob Bornecrantz 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.
*/
/*
* This program is based on eglgears and xegl_tri.
* Remixed by Jakob Bornecrantz
*
* No command line options.
* Program runs for 5 seconds then exits, outputing framerate to console
*/
#define EGL_EGLEXT_PROTOTYPES
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <GL/gl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#define MAX_CONFIGS 10
#define MAX_MODES 100
/* XXX this probably isn't very portable */
#include <sys/time.h>
#include <unistd.h>
/* return current time (in seconds) */
static double
current_time(void)
{
struct timeval tv;
#ifdef __VMS
(void) gettimeofday(&tv, NULL );
#else
struct timezone tz;
(void) gettimeofday(&tv, &tz);
#endif
return (double) tv.tv_sec + tv.tv_usec / 1000000.0;
}
static GLfloat view_rotx = 0.0, view_roty = 0.0, view_rotz = 0.0;
static void draw()
{
static const GLfloat verts[3][2] = {
{ -1, -1 },
{ 1, -1 },
{ 0, 1 }
};
static const GLfloat colors[3][3] = {
{ 1, 0, 0 },
{ 0, 1, 0 },
{ 0, 0, 1 }
};
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glRotatef(view_rotx, 1, 0, 0);
glRotatef(view_roty, 0, 1, 0);
glRotatef(view_rotz, 0, 0, 1);
{
glVertexPointer(2, GL_FLOAT, 0, verts);
glColorPointer(3, GL_FLOAT, 0, colors);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glDrawArrays(GL_TRIANGLES, 0, 3);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
}
glPopMatrix();
}
static void init()
{
glClearColor(0.4, 0.4, 0.4, 0.0);
}
/* new window size or exposure */
static void reshape(int width, int height)
{
GLfloat ar = (GLfloat) width / (GLfloat) height;
glViewport(0, 0, (GLint) width, (GLint) height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-ar, ar, -1, 1, 5.0, 60.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0, -10.0);
}
static void run(EGLDisplay dpy, EGLSurface surf, int ttr)
{
double st = current_time();
double ct = st;
int frames = 0;
GLfloat seconds, fps;
while (ct - st < ttr)
{
ct = current_time();
draw();
eglSwapBuffers(dpy, surf);
frames++;
}
seconds = ct - st;
fps = frames / seconds;
printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps);
}
int main(int argc, char *argv[])
{
int maj, min;
EGLContext ctx;
EGLSurface screen_surf;
EGLConfig configs[MAX_CONFIGS];
EGLint numConfigs, i;
EGLBoolean b;
EGLDisplay d;
EGLint screenAttribs[10];
EGLModeMESA mode[MAX_MODES];
EGLScreenMESA screen;
EGLint count, chosenMode = 0;
GLboolean printInfo = GL_FALSE;
EGLint width = 0, height = 0;
/* parse cmd line args */
for (i = 1; i < argc; i++)
{
if (strcmp(argv[i], "-info") == 0)
{
printInfo = GL_TRUE;
}
else
printf("Warning: unknown parameter: %s\n", argv[i]);
}
/* DBR : Create EGL context/surface etc */
d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
assert(d);
if (!eglInitialize(d, &maj, &min)) {
printf("egltri: eglInitialize failed\n");
exit(1);
}
printf("egltri: EGL version = %d.%d\n", maj, min);
printf("egltri: EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
/* XXX use ChooseConfig */
eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs);
eglGetScreensMESA(d, &screen, 1, &count);
if (!eglGetModesMESA(d, screen, mode, MAX_MODES, &count) || count == 0) {
printf("egltri: eglGetModesMESA failed!\n");
return 0;
}
/* Print list of modes, and find the one to use */
printf("egltri: Found %d modes:\n", count);
for (i = 0; i < count; i++) {
EGLint w, h;
eglGetModeAttribMESA(d, mode[i], EGL_WIDTH, &w);
eglGetModeAttribMESA(d, mode[i], EGL_HEIGHT, &h);
printf("%3d: %d x %d\n", i, w, h);
if (w > width && h > height) {
width = w;
height = h;
chosenMode = i;
}
}
printf("egltri: Using screen mode/size %d: %d x %d\n", chosenMode, width, height);
eglBindAPI(EGL_OPENGL_API);
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
if (ctx == EGL_NO_CONTEXT) {
printf("egltri: failed to create context\n");
return 0;
}
/* build up screenAttribs array */
i = 0;
screenAttribs[i++] = EGL_WIDTH;
screenAttribs[i++] = width;
screenAttribs[i++] = EGL_HEIGHT;
screenAttribs[i++] = height;
screenAttribs[i++] = EGL_NONE;
screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
if (screen_surf == EGL_NO_SURFACE) {
printf("egltri: failed to create screen surface\n");
return 0;
}
b = eglShowScreenSurfaceMESA(d, screen, screen_surf, mode[chosenMode]);
if (!b) {
printf("egltri: show surface failed\n");
return 0;
}
b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
if (!b) {
printf("egltri: make current failed\n");
return 0;
}
if (printInfo)
{
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
}
init();
reshape(width, height);
glDrawBuffer( GL_BACK );
run(d, screen_surf, 5.0);
eglDestroySurface(d, screen_surf);
eglDestroyContext(d, ctx);
eglTerminate(d);
return 0;
}
# progs/egl/eglut
TOP = ../../..
include $(TOP)/configs/current
INCLUDES = \
-I$(TOP)/include
SOURCES = $(wildcard *.c)
EGLUT_X11_OBJECTS = eglut.o eglut_x11.o
EGLUT_SCREEN_OBJECTS = eglut.o eglut_screen.o
default: depend libeglut-x11.a libeglut-screen.a
libeglut-x11.a: $(EGLUT_X11_OBJECTS)
$(MKLIB) -o eglut-x11 -static $(EGLUT_X11_OBJECTS)
libeglut-screen.a: $(EGLUT_SCREEN_OBJECTS)
$(MKLIB) -o eglut-screen -static $(EGLUT_SCREEN_OBJECTS)
.c.o:
$(CC) -c -o $@ $< $(INCLUDES) $(DEFINES) $(CFLAGS)
depend: $(SOURCES)
@rm -f depend
@touch depend
@$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
> /dev/null 2>/dev/null
clean:
rm -f *.o *.a
rm -f depend depend.bak
sinclude depend
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/time.h>
#include "EGL/egl.h"
#include "EGL/eglext.h"
#include "eglutint.h"
static struct eglut_state _eglut_state = {
.api_mask = EGLUT_OPENGL_ES1_BIT,
.window_width = 300,
.window_height = 300,
.verbose = 0,
.num_windows = 0,
};
struct eglut_state *_eglut = &_eglut_state;
void
_eglutFatal(char *format, ...)
{
va_list args;
va_start(args, format);
fprintf(stderr, "EGLUT: ");
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
exit(1);
}
/* return current time (in milliseconds) */
int
_eglutNow(void)
{
struct timeval tv;
#ifdef __VMS
(void) gettimeofday(&tv, NULL );
#else
struct timezone tz;
(void) gettimeofday(&tv, &tz);
#endif
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}
static void
_eglutDestroyWindow(struct eglut_window *win)
{
if (_eglut->surface_type != EGL_PBUFFER_BIT &&
_eglut->surface_type != EGL_SCREEN_BIT_MESA)