diff options
author | Brian Paul <[email protected]> | 2012-01-04 14:55:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-02-15 14:07:43 -0700 |
commit | c04db7f7fad883891084d7f2e9a0040a17c48fe8 (patch) | |
tree | 94580cf15b55b6e017a8cd200a60dc2f687550e0 /src/mesa/main/texobj.h | |
parent | 447071cfb01cf52e3e6591c71684a689f7e900fa (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.h')
-rw-r--r-- | src/mesa/main/texobj.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index 9ca7a4c9e11..03dfbe3045d 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -34,8 +34,8 @@ #include "compiler.h" #include "glheader.h" +#include "mtypes.h" -struct gl_context; /** * \name Internal functions @@ -89,7 +89,7 @@ _mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj, GLboolean invalidate_state); extern struct gl_texture_object * -_mesa_get_fallback_texture(struct gl_context *ctx); +_mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex); extern void _mesa_unlock_context_textures( struct gl_context *ctx ); |