aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-09 13:28:28 +0100
committermarha <marha@users.sourceforge.net>2012-11-09 13:28:28 +0100
commit19b61957dbf473cddbae72792ddeeaee4d4a7077 (patch)
tree0839a8b0cc9c6ea5f3ae63cc34726d4ef936995d /mesalib/src/gallium
parent480a7a0a6c9a8fae5b8fc7b7688173d5e425ae0e (diff)
parent8d57b7fcb22cf1a52203ee57c745b64bba649249 (diff)
downloadvcxsrv-19b61957dbf473cddbae72792ddeeaee4d4a7077.tar.gz
vcxsrv-19b61957dbf473cddbae72792ddeeaee4d4a7077.tar.bz2
vcxsrv-19b61957dbf473cddbae72792ddeeaee4d4a7077.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa git update 9 nov 2012
Diffstat (limited to 'mesalib/src/gallium')
-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;