From a4fa21505883ec9eef905079a5160d07ffc67ae7 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 19 Aug 2016 19:52:14 +0200 Subject: radeonsi: fix cubemaps viewed as 2D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: GL43-CTS.texture_view.view_sampling v2: fix a typo, merge both if statements Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Dave Airlie (v1) Reviewed-by: Bas Nieuwenhuizen (v1) Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_state.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index a1c8720ce70..41ff3200294 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1610,6 +1610,10 @@ static unsigned si_tex_dim(unsigned res_target, unsigned view_target, if (view_target == PIPE_TEXTURE_CUBE || view_target == PIPE_TEXTURE_CUBE_ARRAY) res_target = view_target; + /* If interpreting cubemaps as something else, set 2D_ARRAY. */ + else if (res_target == PIPE_TEXTURE_CUBE || + res_target == PIPE_TEXTURE_CUBE_ARRAY) + res_target = PIPE_TEXTURE_2D_ARRAY; switch (res_target) { default: -- cgit v1.2.3