aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-09 13:27:06 +0100
committermarha <marha@users.sourceforge.net>2012-11-09 13:27:06 +0100
commit8d57b7fcb22cf1a52203ee57c745b64bba649249 (patch)
treeaaf65faecb30fbffbe7bb11d4bff43ea3297cf2e /mesalib/src/gallium/auxiliary/util
parent1738a6973deb03f33a71c9527594727cb8bb64b4 (diff)
downloadvcxsrv-8d57b7fcb22cf1a52203ee57c745b64bba649249.tar.gz
vcxsrv-8d57b7fcb22cf1a52203ee57c745b64bba649249.tar.bz2
vcxsrv-8d57b7fcb22cf1a52203ee57c745b64bba649249.zip
mesa git update 9 nov 2012
mesa: 011f8458805e443ac9130865d2840a929a00cabf
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c12
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_inlines.h3
2 files changed, 12 insertions, 3 deletions
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;