mesa: Prefix main includes with dir to avoid conflicts.
[mesa.git] / src / mesa / state_tracker / st_atom_pixeltransfer.c
index e500ac8684df9e0091df70259d9aed5163a0565c..a357b716771c53811dfe5c19fe49102a4457830f 100644 (file)
@@ -77,7 +77,7 @@ is_identity(const GLfloat m[16])
    GLuint i;
    for (i = 0; i < 16; i++) {
       const int row = i % 4, col = i / 4;
-      const float val = (row == col);
+      const float val = (GLfloat)(row == col);
       if (m[i] != val)
          return GL_FALSE;
    }
@@ -122,7 +122,7 @@ create_color_map_texture(GLcontext *ctx)
    const uint texSize = 256; /* simple, and usually perfect */
 
    /* find an RGBA texture format */
-   format = st_choose_format(pipe, GL_RGBA, PIPE_TEXTURE);
+   format = st_choose_format(pipe, GL_RGBA, PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_SAMPLER);
 
    /* create texture for color map/table */
    pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, 0,