mesa: fix _mesa_get_fallback_texture() to handle all texture targets
authorBrian Paul <brianp@vmware.com>
Wed, 4 Jan 2012 21:55:32 +0000 (14:55 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 15 Feb 2012 21:07:43 +0000 (14:07 -0700)
commitc04db7f7fad883891084d7f2e9a0040a17c48fe8
tree94580cf15b55b6e017a8cd200a60dc2f687550e0
parent447071cfb01cf52e3e6591c71684a689f7e900fa
mesa: fix _mesa_get_fallback_texture() to handle all texture targets

Previously, this function only handled 2D textures.

The fallback texture is used when we try to sample from an incomplete
texture object.  GLSL says sampling an incomplete texture should return
(0,0,0,1).

v2: use a 1-texel texture image, per José.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/main/mtypes.h
src/mesa/main/shared.c
src/mesa/main/texobj.c
src/mesa/main/texobj.h
src/mesa/main/texstate.c