diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-26 05:30:39 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-26 05:30:39 +0000 |
commit | 27c93456b58343162f7c4ad20ca6bea0c9a91646 (patch) | |
tree | 945c20b63e0b9975ee40f114c5312f8d8f1a2d0b /lib/mesa/src/gallium/drivers/panfrost/pan_resource.h | |
parent | 875b83a3ee95e248388fbf72271acc80f6f97987 (diff) |
Import Mesa 20.1.6
Diffstat (limited to 'lib/mesa/src/gallium/drivers/panfrost/pan_resource.h')
-rw-r--r-- | lib/mesa/src/gallium/drivers/panfrost/pan_resource.h | 61 |
1 files changed, 18 insertions, 43 deletions
diff --git a/lib/mesa/src/gallium/drivers/panfrost/pan_resource.h b/lib/mesa/src/gallium/drivers/panfrost/pan_resource.h index 6ed3d1fd6..0a25e305d 100644 --- a/lib/mesa/src/gallium/drivers/panfrost/pan_resource.h +++ b/lib/mesa/src/gallium/drivers/panfrost/pan_resource.h @@ -29,40 +29,11 @@ #include <panfrost-job.h> #include "pan_screen.h" #include "pan_allocate.h" +#include "pan_minmax_cache.h" +#include "pan_texture.h" #include "drm-uapi/drm.h" #include "util/u_range.h" -/* Describes the memory layout of a BO */ - -enum panfrost_memory_layout { - PAN_LINEAR, - PAN_TILED, - PAN_AFBC -}; - -struct panfrost_slice { - unsigned offset; - unsigned stride; - - /* If there is a header preceding each slice, how big is - * that header? Used for AFBC */ - unsigned header_size; - - /* If checksumming is enabled following the slice, what - * is its offset/stride? */ - unsigned checksum_offset; - unsigned checksum_stride; - - /* Has anything been written to this slice? */ - bool initialized; -}; - -void -panfrost_bo_reference(struct panfrost_bo *bo); - -void -panfrost_bo_unreference(struct pipe_screen *screen, struct panfrost_bo *bo); - struct panfrost_resource { struct pipe_resource base; struct { @@ -84,10 +55,15 @@ struct panfrost_resource { unsigned cubemap_stride; /* Internal layout (tiled?) */ - enum panfrost_memory_layout layout; + enum mali_texture_layout layout; /* Is transaciton elimination enabled? */ bool checksummed; + + enum pipe_format internal_format; + + /* Cached min/max values for index buffers */ + struct panfrost_minmax_cache *index_cache; }; static inline struct panfrost_resource * @@ -112,25 +88,17 @@ panfrost_get_texture_address( struct panfrost_resource *rsrc, unsigned level, unsigned face); -void panfrost_resource_screen_init(struct panfrost_screen *screen); +void panfrost_resource_screen_init(struct pipe_screen *screen); void panfrost_resource_context_init(struct pipe_context *pctx); void panfrost_resource_hint_layout( - struct panfrost_screen *screen, + struct panfrost_device *dev, struct panfrost_resource *rsrc, - enum panfrost_memory_layout layout, + enum mali_texture_layout layout, signed weight); -/* AFBC */ - -bool -panfrost_format_supports_afbc(enum pipe_format format); - -unsigned -panfrost_afbc_header_size(unsigned width, unsigned height); - /* Blitting */ void @@ -142,9 +110,16 @@ panfrost_blit_wallpaper(struct panfrost_context *ctx, struct pipe_box *box); void +panfrost_resource_reset_damage(struct panfrost_resource *pres); + +void panfrost_resource_set_damage_region(struct pipe_screen *screen, struct pipe_resource *res, unsigned int nrects, const struct pipe_box *rects); + +struct panfrost_bo * +pan_bo_create(struct panfrost_device *dev, size_t size, uint32_t flags); + #endif /* PAN_RESOURCE_H */ |