diff options
author | Dave Airlie <[email protected]> | 2012-11-09 20:31:00 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-11-09 20:34:23 +1000 |
commit | 1d9738dab31fc00284d2d2cb0164479068e02557 (patch) | |
tree | 9b2b188abed66664b7aca4a9c4061266cdc656f6 /src/gallium/auxiliary/util | |
parent | eabbe5c45f5d05822c5f841628afa4008398d553 (diff) |
u_blitter: don't create fragment program for cube maps unless supported.
should fix http://bugs.freedesktop.org/56906
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 5ea6acac71b..0c1430e23db 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); |