Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts: progs/demos/projtex.c progs/xdemos/glxinfo.c src/mesa/main/version.h To fix the confilicts in projtex.c and glxinfo.c I just took the code from mesa_7_6_branch. The conflicts seem to have occured from cherry-picks from mesa_7_7_branch to mesa_7_6_branch followed by commmits just to mesa_7_6_branch.
This commit is contained in:
@@ -56,6 +56,8 @@ tbd
|
|||||||
<li>Fixed clipping / provoking vertex bugs in i965 driver.
|
<li>Fixed clipping / provoking vertex bugs in i965 driver.
|
||||||
<li>Assorted build fixes for AIX.
|
<li>Assorted build fixes for AIX.
|
||||||
<li>Endianness fixes for the DRI swrast driver (bug 22767).</li>
|
<li>Endianness fixes for the DRI swrast driver (bug 22767).</li>
|
||||||
|
<li>Point sprite fixes for i915/945 driver.
|
||||||
|
<li>Fixed assorted memory leaks (usually on error paths)
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Changes</h2>
|
<h2>Changes</h2>
|
||||||
|
@@ -248,6 +248,7 @@ loadImageTextures(void)
|
|||||||
|
|
||||||
free(texData3);
|
free(texData3);
|
||||||
free(texData4);
|
free(texData4);
|
||||||
|
free(image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@ SOURCES = \
|
|||||||
tri-depth2.c \
|
tri-depth2.c \
|
||||||
tri-depthwrite.c \
|
tri-depthwrite.c \
|
||||||
tri-depthwrite2.c \
|
tri-depthwrite2.c \
|
||||||
|
tri-inv.c \
|
||||||
tri-param.c \
|
tri-param.c \
|
||||||
fp-tri.c
|
fp-tri.c
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ static void Key(unsigned char key, int x, int y)
|
|||||||
case 27:
|
case 27:
|
||||||
exit(1);
|
exit(1);
|
||||||
default:
|
default:
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
|
@@ -10,7 +10,7 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(T
|
|||||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||||
|
|
||||||
PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
|
PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
|
||||||
font line logo nurb olympic overlay point prim quad select \
|
font line logo nurb olympic overlay point prim rgbtoppm quad select \
|
||||||
shape sphere star stencil stretch texture tri wave
|
shape sphere star stencil stretch texture tri wave
|
||||||
|
|
||||||
|
|
||||||
|
@@ -86,7 +86,8 @@ static ImageRec *ImageOpen(char *fileName)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if ((image->file = fopen(fileName, "rb")) == NULL) {
|
if ((image->file = fopen(fileName, "rb")) == NULL) {
|
||||||
return NULL;
|
free(image);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fread(image, 1, 12, image->file);
|
fread(image, 1, 12, image->file);
|
||||||
@@ -224,6 +225,7 @@ read_rgb_texture(char *name, int *width, int *height)
|
|||||||
if (gbuf) free(gbuf);
|
if (gbuf) free(gbuf);
|
||||||
if (bbuf) free(bbuf);
|
if (bbuf) free(bbuf);
|
||||||
if (abuf) free(abuf);
|
if (abuf) free(abuf);
|
||||||
|
ImageClose(image);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ptr = base;
|
ptr = base;
|
||||||
|
@@ -162,7 +162,7 @@ MeasureDownloadRate(void)
|
|||||||
const int image_bytes = align(w * h * BytesPerTexel(Format), ALIGN);
|
const int image_bytes = align(w * h * BytesPerTexel(Format), ALIGN);
|
||||||
const int bytes = image_bytes * NR_TEXOBJ;
|
const int bytes = image_bytes * NR_TEXOBJ;
|
||||||
GLubyte *orig_texImage, *orig_getImage;
|
GLubyte *orig_texImage, *orig_getImage;
|
||||||
GLubyte *texImage, *getImage;
|
GLubyte *texImage;
|
||||||
GLdouble t0, t1, time;
|
GLdouble t0, t1, time;
|
||||||
int count;
|
int count;
|
||||||
int i;
|
int i;
|
||||||
@@ -184,7 +184,6 @@ MeasureDownloadRate(void)
|
|||||||
printf("alloc %p %p\n", orig_texImage, orig_getImage);
|
printf("alloc %p %p\n", orig_texImage, orig_getImage);
|
||||||
|
|
||||||
texImage = (GLubyte *)align((unsigned long)orig_texImage, ALIGN);
|
texImage = (GLubyte *)align((unsigned long)orig_texImage, ALIGN);
|
||||||
getImage = (GLubyte *)align((unsigned long)orig_getImage, ALIGN);
|
|
||||||
|
|
||||||
for (i = 1; !(((unsigned long)texImage) & i); i<<=1)
|
for (i = 1; !(((unsigned long)texImage) & i); i<<=1)
|
||||||
;
|
;
|
||||||
|
@@ -84,9 +84,9 @@ static void check_link(GLuint prog)
|
|||||||
static void setup_uniforms()
|
static void setup_uniforms()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
GLuint loc1f = glGetUniformLocationARB(program, "Offset1f");
|
GLint loc1f = glGetUniformLocationARB(program, "Offset1f");
|
||||||
GLuint loc2f = glGetUniformLocationARB(program, "Offset2f");
|
GLint loc2f = glGetUniformLocationARB(program, "Offset2f");
|
||||||
GLuint loc4f = glGetUniformLocationARB(program, "Offset4f");
|
GLint loc4f = glGetUniformLocationARB(program, "Offset4f");
|
||||||
GLfloat vecKer[] =
|
GLfloat vecKer[] =
|
||||||
{ 1.0, 0.0, 0.0, 1.0,
|
{ 1.0, 0.0, 0.0, 1.0,
|
||||||
0.0, 1.0, 0.0, 1.0,
|
0.0, 1.0, 0.0, 1.0,
|
||||||
@@ -105,9 +105,9 @@ static void setup_uniforms()
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
GLuint loc1f = glGetUniformLocationARB(program, "KernelValue1f");
|
GLint loc1f = glGetUniformLocationARB(program, "KernelValue1f");
|
||||||
GLuint loc2f = glGetUniformLocationARB(program, "KernelValue2f");
|
GLint loc2f = glGetUniformLocationARB(program, "KernelValue2f");
|
||||||
GLuint loc4f = glGetUniformLocationARB(program, "KernelValue4f");
|
GLint loc4f = glGetUniformLocationARB(program, "KernelValue4f");
|
||||||
GLfloat vecKer[] =
|
GLfloat vecKer[] =
|
||||||
{ 1.0, 0.0, 0.0, 0.25,
|
{ 1.0, 0.0, 0.0, 0.25,
|
||||||
0.0, 1.0, 0.0, 0.25,
|
0.0, 1.0, 0.0, 0.25,
|
||||||
|
@@ -401,6 +401,10 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
|
|||||||
|
|
||||||
root = RootWindow(dpy, scrnum);
|
root = RootWindow(dpy, scrnum);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find a basic GLX visual. We'll then create a rendering context and
|
||||||
|
* query various info strings.
|
||||||
|
*/
|
||||||
visinfo = glXChooseVisual(dpy, scrnum, attribSingle);
|
visinfo = glXChooseVisual(dpy, scrnum, attribSingle);
|
||||||
if (!visinfo)
|
if (!visinfo)
|
||||||
visinfo = glXChooseVisual(dpy, scrnum, attribDouble);
|
visinfo = glXChooseVisual(dpy, scrnum, attribDouble);
|
||||||
@@ -409,24 +413,29 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
|
|||||||
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
|
ctx = glXCreateContext( dpy, visinfo, NULL, allowDirect );
|
||||||
|
|
||||||
#ifdef GLX_VERSION_1_3
|
#ifdef GLX_VERSION_1_3
|
||||||
{
|
/* Try glXChooseFBConfig() if glXChooseVisual didn't work.
|
||||||
|
* XXX when would that happen?
|
||||||
|
*/
|
||||||
|
if (!visinfo) {
|
||||||
int fbAttribSingle[] = {
|
int fbAttribSingle[] = {
|
||||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||||
GLX_RED_SIZE, 1,
|
GLX_RED_SIZE, 1,
|
||||||
GLX_GREEN_SIZE, 1,
|
GLX_GREEN_SIZE, 1,
|
||||||
GLX_BLUE_SIZE, 1,
|
GLX_BLUE_SIZE, 1,
|
||||||
GLX_DOUBLEBUFFER, GL_TRUE,
|
GLX_DOUBLEBUFFER, GL_FALSE,
|
||||||
None };
|
None };
|
||||||
int fbAttribDouble[] = {
|
int fbAttribDouble[] = {
|
||||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||||
GLX_RED_SIZE, 1,
|
GLX_RED_SIZE, 1,
|
||||||
GLX_GREEN_SIZE, 1,
|
GLX_GREEN_SIZE, 1,
|
||||||
GLX_BLUE_SIZE, 1,
|
GLX_BLUE_SIZE, 1,
|
||||||
|
GLX_DOUBLEBUFFER, GL_TRUE,
|
||||||
None };
|
None };
|
||||||
GLXFBConfig *configs = NULL;
|
GLXFBConfig *configs = NULL;
|
||||||
int nConfigs;
|
int nConfigs;
|
||||||
|
|
||||||
if (!visinfo)
|
configs = glXChooseFBConfig(dpy, scrnum, fbAttribSingle, &nConfigs);
|
||||||
|
if (!configs)
|
||||||
configs = glXChooseFBConfig(dpy, scrnum, fbAttribDouble, &nConfigs);
|
configs = glXChooseFBConfig(dpy, scrnum, fbAttribDouble, &nConfigs);
|
||||||
|
|
||||||
if (configs) {
|
if (configs) {
|
||||||
|
@@ -35,4 +35,4 @@ include ../../Makefile.template
|
|||||||
.PHONY : $(COMPILER_ARCHIVE)
|
.PHONY : $(COMPILER_ARCHIVE)
|
||||||
|
|
||||||
$(COMPILER_ARCHIVE):
|
$(COMPILER_ARCHIVE):
|
||||||
cd $(TOP)/src/mesa/drivers/dri/r300/compiler; make
|
$(MAKE) -C $(TOP)/src/mesa/drivers/dri/r300/compiler
|
||||||
|
@@ -262,29 +262,6 @@ void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask )
|
|
||||||
{
|
|
||||||
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
|
|
||||||
GLuint i;
|
|
||||||
drm_radeon_stipple_t stipple;
|
|
||||||
|
|
||||||
/* Must flip pattern upside down.
|
|
||||||
*/
|
|
||||||
for ( i = 0 ; i < 32 ; i++ ) {
|
|
||||||
stipple.mask[31 - i] = ((GLuint *) mask)[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: push this into cmd mechanism
|
|
||||||
*/
|
|
||||||
radeon_firevertices(radeon);
|
|
||||||
LOCK_HARDWARE( radeon );
|
|
||||||
|
|
||||||
drmCommandWrite( radeon->dri.fd, DRM_RADEON_STIPPLE,
|
|
||||||
&stipple, sizeof(stipple) );
|
|
||||||
UNLOCK_HARDWARE( radeon );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ================================================================
|
/* ================================================================
|
||||||
* SwapBuffers with client-side throttling
|
* SwapBuffers with client-side throttling
|
||||||
*/
|
*/
|
||||||
|
@@ -10,7 +10,6 @@ void radeonRecalcScissorRects(radeonContextPtr radeon);
|
|||||||
void radeonSetCliprects(radeonContextPtr radeon);
|
void radeonSetCliprects(radeonContextPtr radeon);
|
||||||
void radeonUpdateScissor( GLcontext *ctx );
|
void radeonUpdateScissor( GLcontext *ctx );
|
||||||
void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
|
void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
|
||||||
void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask );
|
|
||||||
|
|
||||||
void radeonWaitForIdleLocked(radeonContextPtr radeon);
|
void radeonWaitForIdleLocked(radeonContextPtr radeon);
|
||||||
extern uint32_t radeonGetAge(radeonContextPtr radeon);
|
extern uint32_t radeonGetAge(radeonContextPtr radeon);
|
||||||
|
@@ -331,8 +331,12 @@ struct r100_hw_state {
|
|||||||
struct radeon_state_atom stp;
|
struct radeon_state_atom stp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct radeon_stipple_state {
|
||||||
|
GLuint mask[32];
|
||||||
|
};
|
||||||
|
|
||||||
struct r100_state {
|
struct r100_state {
|
||||||
|
struct radeon_stipple_state stipple;
|
||||||
struct radeon_texture_state texture;
|
struct radeon_texture_state texture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -550,6 +550,31 @@ static void radeonPolygonOffset( GLcontext *ctx,
|
|||||||
rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = constant.ui32;
|
rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = constant.ui32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask )
|
||||||
|
{
|
||||||
|
r100ContextPtr rmesa = R100_CONTEXT(ctx);
|
||||||
|
GLuint i;
|
||||||
|
drm_radeon_stipple_t stipple;
|
||||||
|
|
||||||
|
/* Must flip pattern upside down.
|
||||||
|
*/
|
||||||
|
for ( i = 0 ; i < 32 ; i++ ) {
|
||||||
|
rmesa->state.stipple.mask[31 - i] = ((GLuint *) mask)[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: push this into cmd mechanism
|
||||||
|
*/
|
||||||
|
radeon_firevertices(&rmesa->radeon);
|
||||||
|
LOCK_HARDWARE( &rmesa->radeon );
|
||||||
|
|
||||||
|
/* FIXME: Use window x,y offsets into stipple RAM.
|
||||||
|
*/
|
||||||
|
stipple.mask = rmesa->state.stipple.mask;
|
||||||
|
drmCommandWrite( rmesa->radeon.dri.fd, DRM_RADEON_STIPPLE,
|
||||||
|
&stipple, sizeof(drm_radeon_stipple_t) );
|
||||||
|
UNLOCK_HARDWARE( &rmesa->radeon );
|
||||||
|
}
|
||||||
|
|
||||||
static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
|
static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode )
|
||||||
{
|
{
|
||||||
r100ContextPtr rmesa = R100_CONTEXT(ctx);
|
r100ContextPtr rmesa = R100_CONTEXT(ctx);
|
||||||
|
Reference in New Issue
Block a user