aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium
diff options
context:
space:
mode:
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;