From 8d57b7fcb22cf1a52203ee57c745b64bba649249 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 9 Nov 2012 13:27:06 +0100 Subject: mesa git update 9 nov 2012 mesa: 011f8458805e443ac9130865d2840a929a00cabf --- mesalib/src/gallium/auxiliary/util/u_blitter.c | 12 +++++++++--- mesalib/src/gallium/auxiliary/util/u_inlines.h | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'mesalib/src/gallium') diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index d10ce231c..0c1430e23 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -647,9 +647,10 @@ static void blitter_set_texcoords(struct blitter_context_priv *ctx, get_texcoords(src, src_width0, src_height0, x1, y1, x2, y2, coord); - if (src->texture->target == PIPE_TEXTURE_CUBE) { + if (src->texture->target == PIPE_TEXTURE_CUBE || + src->texture->target == PIPE_TEXTURE_CUBE_ARRAY) { set_texcoords_in_vertices(coord, &face_coord[0][0], 2); - util_map_texcoords2d_onto_cubemap(layer, + util_map_texcoords2d_onto_cubemap(layer % 6, /* pointer, stride in floats */ &face_coord[0][0], 2, &ctx->vertices[0][1][0], 8); @@ -876,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); @@ -897,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); diff --git a/mesalib/src/gallium/auxiliary/util/u_inlines.h b/mesalib/src/gallium/auxiliary/util/u_inlines.h index 3d68cf540..6ef5fecc6 100644 --- a/mesalib/src/gallium/auxiliary/util/u_inlines.h +++ b/mesalib/src/gallium/auxiliary/util/u_inlines.h @@ -523,6 +523,9 @@ util_pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target, return nr_samples > 1 ? TGSI_TEXTURE_2D_ARRAY_MSAA : TGSI_TEXTURE_2D_ARRAY; + case PIPE_TEXTURE_CUBE_ARRAY: + return TGSI_TEXTURE_CUBE_ARRAY; + default: assert(0 && "unexpected texture target"); return TGSI_TEXTURE_UNKNOWN; -- cgit v1.2.3