diff options
author | Brian Paul <[email protected]> | 2012-02-12 16:30:28 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-02-15 14:07:43 -0700 |
commit | ea2aca036c742474cda03e3b7012b188a14d0287 (patch) | |
tree | cf1e3811df10859ca8642e229e351048974ecda5 /src/mesa/state_tracker/st_cb_texture.c | |
parent | c04db7f7fad883891084d7f2e9a0040a17c48fe8 (diff) |
st/mesa: remove st_get_default_texture()
Just use _mesa_get_fallback_texture() instead.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 5cd9a4c94ee..c2011daa8e7 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1337,57 +1337,6 @@ st_finalize_texture(struct gl_context *ctx, /** - * Returns pointer to a default/dummy texture. - * This is typically used when the current shader has tex/sample instructions - * but the user has not provided a (any) texture(s). - */ -struct gl_texture_object * -st_get_default_texture(struct st_context *st) -{ - if (!st->default_texture) { - static const GLenum target = GL_TEXTURE_2D; - GLubyte pixels[16][16][4]; - struct gl_texture_object *texObj; - struct gl_texture_image *texImg; - GLuint i, j; - - /* The ARB_fragment_program spec says (0,0,0,1) should be returned - * when attempting to sample incomplete textures. - */ - for (i = 0; i < 16; i++) { - for (j = 0; j < 16; j++) { - pixels[i][j][0] = 0; - pixels[i][j][1] = 0; - pixels[i][j][2] = 0; - pixels[i][j][3] = 255; - } - } - - texObj = st->ctx->Driver.NewTextureObject(st->ctx, 0, target); - - texImg = _mesa_get_tex_image(st->ctx, texObj, target, 0); - - _mesa_init_teximage_fields(st->ctx, texImg, - 16, 16, 1, 0, /* w, h, d, border */ - GL_RGBA, MESA_FORMAT_RGBA8888); - - _mesa_store_teximage2d(st->ctx, texImg, - GL_RGBA, /* level, intformat */ - 16, 16, 1, /* w, h, d, border */ - GL_RGBA, GL_UNSIGNED_BYTE, pixels, - &st->ctx->DefaultPacking); - - texObj->Sampler.MinFilter = GL_NEAREST; - texObj->Sampler.MagFilter = GL_NEAREST; - texObj->_Complete = GL_TRUE; - - st->default_texture = texObj; - } - return st->default_texture; -} - - -/** * Called via ctx->Driver.AllocTextureStorage() to allocate texture memory * for a whole mipmap stack. */ |