diff options
author | Andre Maasikas <[email protected]> | 2009-12-08 11:57:24 +0200 |
---|---|---|
committer | Andre Maasikas <[email protected]> | 2009-12-08 11:57:24 +0200 |
commit | b5e256c76dea2182c82af2a4f66224735701d55a (patch) | |
tree | 42ab2283fc94ab3deefc30983aaa10f283897dd6 /progs | |
parent | ac66598ed8bc218720cf2a1a7493b7e25ca9d962 (diff) | |
parent | 0d4a05445c6b47b93269a3829afbe509ffec4817 (diff) |
Merge branch 'mesa_7_7_branch'
Conflicts:
src/mesa/drivers/dri/r600/r700_assembler.c
src/mesa/main/version.h
Diffstat (limited to 'progs')
-rw-r--r-- | progs/demos/projtex.c | 1 | ||||
-rwxr-xr-x | progs/fp/Makefile | 1 | ||||
-rw-r--r-- | progs/fp/tri-inv.c | 2 | ||||
-rw-r--r-- | progs/samples/Makefile | 2 | ||||
-rw-r--r-- | progs/samples/rgbtoppm.c | 4 | ||||
-rw-r--r-- | progs/tests/prog_parameter.c | 5 | ||||
-rw-r--r-- | progs/tests/texdown.c | 3 | ||||
-rw-r--r-- | progs/vpglsl/vp-tris.c | 12 | ||||
-rw-r--r-- | progs/xdemos/glxinfo.c | 15 |
9 files changed, 31 insertions, 14 deletions
diff --git a/progs/demos/projtex.c b/progs/demos/projtex.c index ad205c74137..503cf5de088 100644 --- a/progs/demos/projtex.c +++ b/progs/demos/projtex.c @@ -248,6 +248,7 @@ loadImageTextures(void) free(texData3); free(texData4); + free(image); } } diff --git a/progs/fp/Makefile b/progs/fp/Makefile index 681928cf260..d77cd32b4df 100755 --- a/progs/fp/Makefile +++ b/progs/fp/Makefile @@ -17,6 +17,7 @@ SOURCES = \ tri-depth2.c \ tri-depthwrite.c \ tri-depthwrite2.c \ + tri-inv.c \ tri-param.c \ fp-tri.c diff --git a/progs/fp/tri-inv.c b/progs/fp/tri-inv.c index 7e8d8c5ce29..7e490fa61ca 100644 --- a/progs/fp/tri-inv.c +++ b/progs/fp/tri-inv.c @@ -56,7 +56,7 @@ static void Key(unsigned char key, int x, int y) case 27: exit(1); default: - return; + break; } glutPostRedisplay(); diff --git a/progs/samples/Makefile b/progs/samples/Makefile index b300e38b9c2..64fa47addb5 100644 --- a/progs/samples/Makefile +++ b/progs/samples/Makefile @@ -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) 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 diff --git a/progs/samples/rgbtoppm.c b/progs/samples/rgbtoppm.c index 116d9a8cfa5..56ca5b0efe9 100644 --- a/progs/samples/rgbtoppm.c +++ b/progs/samples/rgbtoppm.c @@ -86,7 +86,8 @@ static ImageRec *ImageOpen(char *fileName) exit(1); } if ((image->file = fopen(fileName, "rb")) == NULL) { - return NULL; + free(image); + return NULL; } fread(image, 1, 12, image->file); @@ -224,6 +225,7 @@ read_rgb_texture(char *name, int *width, int *height) if (gbuf) free(gbuf); if (bbuf) free(bbuf); if (abuf) free(abuf); + ImageClose(image); return NULL; } ptr = base; diff --git a/progs/tests/prog_parameter.c b/progs/tests/prog_parameter.c index 0241f3a2496..2de7e2994af 100644 --- a/progs/tests/prog_parameter.c +++ b/progs/tests/prog_parameter.c @@ -192,6 +192,7 @@ static void Init( void ) GLfloat * params; GLint max_program_env_parameters; GLint max_program_local_parameters; + int i; printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); @@ -238,6 +239,10 @@ static void Init( void ) params = malloc(max_program_env_parameters * 4 * sizeof(GLfloat)); + for (i = 0; i < max_program_env_parameters * 4; i++) { + params[i] = 0.0F; + } + pass &= set_parameter_batch(max_program_env_parameters, params, "Env", program_env_parameter4fv, program_env_parameters4fv, diff --git a/progs/tests/texdown.c b/progs/tests/texdown.c index e6881d39a0a..92df01b83d2 100644 --- a/progs/tests/texdown.c +++ b/progs/tests/texdown.c @@ -162,7 +162,7 @@ MeasureDownloadRate(void) const int image_bytes = align(w * h * BytesPerTexel(Format), ALIGN); const int bytes = image_bytes * NR_TEXOBJ; GLubyte *orig_texImage, *orig_getImage; - GLubyte *texImage, *getImage; + GLubyte *texImage; GLdouble t0, t1, time; int count; int i; @@ -184,7 +184,6 @@ MeasureDownloadRate(void) printf("alloc %p %p\n", orig_texImage, orig_getImage); 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) ; diff --git a/progs/vpglsl/vp-tris.c b/progs/vpglsl/vp-tris.c index b2b05080910..6a1fa3d3bf0 100644 --- a/progs/vpglsl/vp-tris.c +++ b/progs/vpglsl/vp-tris.c @@ -84,9 +84,9 @@ static void check_link(GLuint prog) static void setup_uniforms() { { - GLuint loc1f = glGetUniformLocationARB(program, "Offset1f"); - GLuint loc2f = glGetUniformLocationARB(program, "Offset2f"); - GLuint loc4f = glGetUniformLocationARB(program, "Offset4f"); + GLint loc1f = glGetUniformLocationARB(program, "Offset1f"); + GLint loc2f = glGetUniformLocationARB(program, "Offset2f"); + GLint loc4f = glGetUniformLocationARB(program, "Offset4f"); GLfloat vecKer[] = { 1.0, 0.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"); - GLuint loc2f = glGetUniformLocationARB(program, "KernelValue2f"); - GLuint loc4f = glGetUniformLocationARB(program, "KernelValue4f"); + GLint loc1f = glGetUniformLocationARB(program, "KernelValue1f"); + GLint loc2f = glGetUniformLocationARB(program, "KernelValue2f"); + GLint loc4f = glGetUniformLocationARB(program, "KernelValue4f"); GLfloat vecKer[] = { 1.0, 0.0, 0.0, 0.25, 0.0, 1.0, 0.0, 0.25, diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index b182a3091d1..23df82f6f90 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -401,6 +401,10 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits) 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); if (!visinfo) 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 ); #ifdef GLX_VERSION_1_3 - { + /* Try glXChooseFBConfig() if glXChooseVisual didn't work. + * XXX when would that happen? + */ + if (!visinfo) { int fbAttribSingle[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, - GLX_DOUBLEBUFFER, GL_TRUE, + GLX_DOUBLEBUFFER, GL_FALSE, None }; int fbAttribDouble[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, + GLX_DOUBLEBUFFER, GL_TRUE, None }; GLXFBConfig *configs = NULL; int nConfigs; - if (!visinfo) + configs = glXChooseFBConfig(dpy, scrnum, fbAttribSingle, &nConfigs); + if (!configs) configs = glXChooseFBConfig(dpy, scrnum, fbAttribDouble, &nConfigs); if (configs) { |