summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-08-17 23:24:00 +0200
committerMarek Olšák <[email protected]>2017-08-22 13:29:47 +0200
commitfdef2f0fd19ac6f2715a802d1e14b8ddfa094f11 (patch)
treeaa04ee49e7d28c91d1d5813f1c380fa408a395b3 /src/amd
parent113278ee79a6366ad88a4f584aa1c0310d71b479 (diff)
radeonsi/gfx9: properly handle imported textures with unexpected swizzle mode
Cc: 17.2 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_surface.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index 823a65d038f..610071a956f 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -1044,6 +1044,11 @@ static int gfx9_compute_surface(ADDR_HANDLE addrlib,
case RADEON_SURF_MODE_1D:
case RADEON_SURF_MODE_2D:
+ if (surf->flags & RADEON_SURF_IMPORTED) {
+ AddrSurfInfoIn.swizzleMode = surf->u.gfx9.surf.swizzle_mode;
+ break;
+ }
+
r = gfx9_get_preferred_swizzle_mode(addrlib, &AddrSurfInfoIn, false,
&AddrSurfInfoIn.swizzleMode);
if (r)