Path: blob/21.2-virgl/src/gallium/drivers/nouveau/nv30/nv30_resource.h
4574 views
#ifndef __NV30_RESOURCE_H__1#define __NV30_RESOURCE_H__23#include "nouveau_buffer.h"45void nv30_resource_screen_init(struct pipe_screen *);6void nv30_resource_init(struct pipe_context *);78struct nv30_surface {9struct pipe_surface base;10uint32_t offset;11uint32_t pitch;12uint32_t width;13uint16_t height;14uint16_t depth;15};1617static inline struct nv30_surface *18nv30_surface(struct pipe_surface *ps)19{20return (struct nv30_surface *)ps;21}2223struct nv30_miptree_level {24uint32_t offset;25uint32_t pitch;26uint32_t zslice_size;27};2829struct nv30_miptree {30struct nv04_resource base;31struct nv30_miptree_level level[13];32uint32_t uniform_pitch;33uint32_t layer_size;34bool swizzled;35unsigned ms_mode;36unsigned ms_x:1;37unsigned ms_y:1;38};3940static inline struct nv30_miptree *41nv30_miptree(struct pipe_resource *pt)42{43return (struct nv30_miptree *)pt;44}4546struct pipe_resource *47nv30_miptree_create(struct pipe_screen *, const struct pipe_resource *);4849struct pipe_resource *50nv30_miptree_from_handle(struct pipe_screen *, const struct pipe_resource *,51struct winsys_handle *);5253struct pipe_surface *54nv30_miptree_surface_new(struct pipe_context *, struct pipe_resource *,55const struct pipe_surface *);5657void58nv30_miptree_surface_del(struct pipe_context *, struct pipe_surface *);5960bool61nv30_miptree_get_handle(struct pipe_screen *pscreen,62struct pipe_context *context,63struct pipe_resource *pt,64struct winsys_handle *handle,65unsigned usage);6667void68nv30_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt);6970void71nv30_resource_copy_region(struct pipe_context *pipe,72struct pipe_resource *dst, unsigned dst_level,73unsigned dstx, unsigned dsty, unsigned dstz,74struct pipe_resource *src, unsigned src_level,75const struct pipe_box *src_box);7677void78nv30_blit(struct pipe_context *pipe,79const struct pipe_blit_info *blit_info);8081void82nv30_flush_resource(struct pipe_context *pipe,83struct pipe_resource *resource);8485void *86nv30_miptree_transfer_map(struct pipe_context *pipe, struct pipe_resource *pt,87unsigned level, unsigned usage,88const struct pipe_box *box,89struct pipe_transfer **ptransfer);9091void92nv30_miptree_transfer_unmap(struct pipe_context *pipe,93struct pipe_transfer *ptx);9495#endif969798