unsigned row_stride[LP_MAX_TEXTURE_LEVELS];
/** Image stride (for cube maps, array or 3D textures) in bytes */
unsigned img_stride[LP_MAX_TEXTURE_LEVELS];
- /** Number of 3D slices or cube faces per level */
- unsigned num_slices_faces[LP_MAX_TEXTURE_LEVELS];
/** Offset to start of mipmap level, in bytes */
unsigned mip_offsets[LP_MAX_TEXTURE_LEVELS];
+ /** allocated total size (for non-display target texture resources only) */
+ unsigned total_alloc_size;
/**
* Display target, for textures with the PIPE_BIND_DISPLAY_TARGET
/** cast wrappers */
-static INLINE struct llvmpipe_resource *
+static inline struct llvmpipe_resource *
llvmpipe_resource(struct pipe_resource *pt)
{
return (struct llvmpipe_resource *) pt;
}
-static INLINE const struct llvmpipe_resource *
+static inline const struct llvmpipe_resource *
llvmpipe_resource_const(const struct pipe_resource *pt)
{
return (const struct llvmpipe_resource *) pt;
}
-static INLINE struct llvmpipe_transfer *
+static inline struct llvmpipe_transfer *
llvmpipe_transfer(struct pipe_transfer *pt)
{
return (struct llvmpipe_transfer *) pt;
void llvmpipe_init_context_resource_funcs(struct pipe_context *pipe);
-static INLINE boolean
+static inline boolean
llvmpipe_resource_is_texture(const struct pipe_resource *resource)
{
switch (resource->target) {
case PIPE_TEXTURE_RECT:
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
+ case PIPE_TEXTURE_CUBE_ARRAY:
return TRUE;
default:
assert(0);
}
-static INLINE boolean
+static inline boolean
llvmpipe_resource_is_1d(const struct pipe_resource *resource)
{
switch (resource->target) {
case PIPE_TEXTURE_RECT:
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
+ case PIPE_TEXTURE_CUBE_ARRAY:
return FALSE;
default:
assert(0);
}
-static INLINE unsigned
+static inline unsigned
llvmpipe_layer_stride(struct pipe_resource *resource,
unsigned level)
{
}
-static INLINE unsigned
+static inline unsigned
llvmpipe_resource_stride(struct pipe_resource *resource,
unsigned level)
{
llvmpipe_get_texture_image_address(struct llvmpipe_resource *lpr,
unsigned face_slice, unsigned level);
-void *
-llvmpipe_get_texture_image(struct llvmpipe_resource *resource,
- unsigned face_slice, unsigned level,
- enum lp_texture_usage usage);
-
-ubyte *
-llvmpipe_get_texture_tile_linear(struct llvmpipe_resource *lpr,
- unsigned face_slice, unsigned level,
- enum lp_texture_usage usage,
- unsigned x, unsigned y);
-
extern void
llvmpipe_print_resources(void);