fix asst glitches
authorBrian <brian.paul@tungstengraphics.com>
Fri, 10 Aug 2007 17:43:04 +0000 (11:43 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 10 Aug 2007 18:14:25 +0000 (12:14 -0600)
src/mesa/state_tracker/st_cb_drawpixels.c

index 20990fe80a6b501f087c7a2927fc36b0bdd759a4..f0c7a2bfc5abf3c86f035451f5bf01dcae35892f 100644 (file)
@@ -81,7 +81,7 @@ make_drawpixels_shader(struct st_context *st)
    /* END; */
    p->Instructions[1].Opcode = OPCODE_END;
 
-   p->InputsRead = FRAG_BIT_COL0;
+   p->InputsRead = FRAG_BIT_TEX0;
    p->OutputsWritten = (1 << FRAG_RESULT_COLR);
 
    stfp = (struct st_fragment_program *) p;
@@ -100,7 +100,7 @@ make_mipmap_tree(struct st_context *st,
                  const struct gl_pixelstore_attrib *unpack,
                  const GLvoid *pixels)
 {
-   GLuint pipeFormat = st_choose_pipe_format(st->pipe, format, type, GL_RGBA);
+   GLuint pipeFormat = st_choose_pipe_format(st->pipe, GL_RGBA, format, type);
    int cpp = 4, pitch;
    struct pipe_mipmap_tree *mt = CALLOC_STRUCT(pipe_mipmap_tree);
 
@@ -249,7 +249,7 @@ static GLboolean
 compatible_formats(GLenum format, GLenum type, GLuint pipeFormat)
 {
    static const GLuint one = 1;
-   GLubyte littleEndian = *((GLubyte *) one);
+   GLubyte littleEndian = *((GLubyte *) &one);
 
    if (pipeFormat == PIPE_FORMAT_U_R8_G8_B8_A8 &&
        format == GL_RGBA &&