diff options
author | Brian Paul <[email protected]> | 2009-05-01 09:30:32 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-01 09:30:32 -0600 |
commit | 3f25219c7bf0f090502489928f0f018e62c4f6cf (patch) | |
tree | 22005061c8d17bc1c57a08af1a93b36b499beb38 /src/mesa/main/texobj.h | |
parent | 7ca04273387fb1af1b67d1359f2b0da4874a0e4c (diff) |
mesa: create/use a fallback texture when bound texture is incomplete
When a GLSL sampler reads from an incomplete texture it should
return (0,0,0,1). Instead of jumping through hoops in all the drivers
to make this happen, just create/install a fallback texture with those
texel values.
Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some
GPU lockups when trying to sample from missing surfaces. If a binding
table entry is NULL, it seems that sampling sometimes works, but not
always (lockup).
Todo: create a fallback texture for each type of texture target?
Diffstat (limited to 'src/mesa/main/texobj.h')
-rw-r--r-- | src/mesa/main/texobj.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index d5374c5d6c4..2599c0816a9 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -65,6 +65,9 @@ extern void _mesa_test_texobj_completeness( const GLcontext *ctx, struct gl_texture_object *obj ); +extern struct gl_texture_object * +_mesa_get_fallback_texture(GLcontext *ctx); + extern void _mesa_unlock_context_textures( GLcontext *ctx ); |