{
struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view);
/*
- * XXX we REALLY want to see the correct bind flag here but the OpenGL
- * state tracker can't guarantee that at least for texture buffer objects.
+ * XXX: bind flags from OpenGL state tracker are notoriously unreliable.
+ * This looks unfixable, so fix the bind flags instead when it happens.
*/
- if (!(texture->bind & PIPE_BIND_SAMPLER_VIEW))
+ if (!(texture->bind & PIPE_BIND_SAMPLER_VIEW)) {
debug_printf("Illegal sampler view creation without bind flag\n");
+ texture->bind |= PIPE_BIND_SAMPLER_VIEW;
+ }
if (view) {
*view = *templ;