From 1d9738dab31fc00284d2d2cb0164479068e02557 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 9 Nov 2012 20:31:00 +1000 Subject: u_blitter: don't create fragment program for cube maps unless supported. should fix http://bugs.freedesktop.org/56906 Signed-off-by: Dave Airlie --- src/gallium/auxiliary/util/u_blitter.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 5ea6aca..0c1430e 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -877,13 +877,15 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter) struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; struct pipe_screen *screen = blitter->pipe->screen; unsigned num_cbufs, i, target, max_samples; - boolean has_arraytex; + boolean has_arraytex, has_cubearraytex; num_cbufs = MAX2(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS), 1); max_samples = ctx->has_texture_multisample ? 2 : 1; has_arraytex = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS) != 0; + has_cubearraytex = screen->get_param(screen, + PIPE_CAP_CUBE_MAP_ARRAY) != 0; for (i = 0; i < num_cbufs; i++) { blitter_get_fs_col(ctx, i, FALSE); @@ -898,6 +900,9 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter) target == PIPE_TEXTURE_2D_ARRAY)) { continue; } + if (!has_arraytex && + (target == PIPE_TEXTURE_CUBE_ARRAY)) + continue; blitter_get_fs_texfetch_col(ctx, target, i); blitter_get_fs_texfetch_depth(ctx, target, i); -- cgit v1.1