diff options
author | Marek Olšák <[email protected]> | 2016-08-19 19:52:14 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-05 18:01:15 +0200 |
commit | a4fa21505883ec9eef905079a5160d07ffc67ae7 (patch) | |
tree | b5e2192e037d0527d902f3592def302da869fa91 /src/gallium/drivers/radeonsi | |
parent | 2975230fdc6a51f4fd9c1edd0504be58dad0955c (diff) |
radeonsi: fix cubemaps viewed as 2D
This fixes: GL43-CTS.texture_view.view_sampling
v2: fix a typo, merge both if statements
Cc: [email protected]
Reviewed-by: Dave Airlie <[email protected]> (v1)
Reviewed-by: Bas Nieuwenhuizen <[email protected]> (v1)
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 4 |
1 files changed, 4 insertions, 0 deletions
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: |