diff options
author | Marek Olšák <[email protected]> | 2017-02-16 00:11:58 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | bd1da6b33975d7fb3be6b2150899e1002c666ef7 (patch) | |
tree | d2e7f8096fee074ab505865158cbe6f6cfed91ef /src/gallium/drivers/radeon | |
parent | 3685a12bad497bd979abf94d2c64ed9dcf1cdc5a (diff) |
radeonsi/gfx9: add radeon_surf.gfx9.surf_offset
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index f1b2cd96bcf..2e66dd0fd4e 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -555,7 +555,7 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, } if (rscreen->chip_class >= GFX9) { - offset = 0; + offset = rtex->surface.u.gfx9.surf_offset; stride = rtex->surface.u.gfx9.surf_pitch * rtex->surface.bpe; slice_size = rtex->surface.u.gfx9.surf_slice_size; diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index 5b032bfea7b..b3c7608c81e 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -354,6 +354,7 @@ struct gfx9_surf_layout { struct gfx9_surf_meta_flags cmask; /* metadata of fmask */ enum gfx9_resource_type resource_type; /* 1D, 2D or 3D */ + uint64_t surf_offset; /* 0 unless imported with an offset */ /* The size of the 2D plane containing all mipmap levels. */ uint64_t surf_slice_size; uint16_t surf_pitch; /* in blocks */ |