diff options
author | Chia-I Wu <[email protected]> | 2015-03-25 12:22:40 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-05-02 22:14:06 +0800 |
commit | 3afbeb115ab19164fb2e5bf8df88b6d03d39254b (patch) | |
tree | 5be286989b69d920f8393c7af77e778e8111e9e9 /src/gallium/drivers/ilo/core | |
parent | ac47563cb40a79ec2bf149c6d9916a9d66361753 (diff) |
ilo: move BOs from ilo_texture to ilo_image
We want to work with ilo_image instead of ilo_texture in core.
Diffstat (limited to 'src/gallium/drivers/ilo/core')
-rw-r--r-- | src/gallium/drivers/ilo/core/ilo_image.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/core/ilo_image.h b/src/gallium/drivers/ilo/core/ilo_image.h index 722a666991d..2ca48b7960f 100644 --- a/src/gallium/drivers/ilo/core/ilo_image.h +++ b/src/gallium/drivers/ilo/core/ilo_image.h @@ -29,6 +29,7 @@ #define ILO_IMAGE_H #include "genhw/genhw.h" +#include "intel_winsys.h" #include "ilo_core.h" #include "ilo_dev.h" @@ -122,6 +123,9 @@ struct ilo_image { unsigned aux_layer_height; unsigned aux_stride; unsigned aux_height; + + struct intel_bo *bo; + struct intel_bo *aux_bo; }; void @@ -134,6 +138,27 @@ ilo_image_update_for_imported_bo(struct ilo_image *img, enum gen_surface_tiling tiling, unsigned bo_stride); +static inline void +ilo_image_cleanup(struct ilo_image *img) +{ + intel_bo_unref(img->bo); + intel_bo_unref(img->aux_bo); +} + +static inline void +ilo_image_set_bo(struct ilo_image *img, struct intel_bo *bo) +{ + intel_bo_unref(img->bo); + img->bo = intel_bo_ref(bo); +} + +static inline void +ilo_image_set_aux_bo(struct ilo_image *img, struct intel_bo *bo) +{ + intel_bo_unref(img->aux_bo); + img->aux_bo = intel_bo_ref(bo); +} + /** * Convert from pixel position to 2D memory offset. */ |