1
#ifndef __NV30_RESOURCE_H__
2
#define __NV30_RESOURCE_H__
4
#include "nouveau_buffer.h"
6
void nv30_resource_screen_init(struct pipe_screen *);
7
void nv30_resource_init(struct pipe_context *);
10
struct pipe_surface base;
18
static inline struct nv30_surface *
19
nv30_surface(struct pipe_surface *ps)
21
return (struct nv30_surface *)ps;
24
struct nv30_miptree_level {
31
struct nv04_resource base;
32
struct nv30_miptree_level level[13];
33
uint32_t uniform_pitch;
41
static inline struct nv30_miptree *
42
nv30_miptree(struct pipe_resource *pt)
44
return (struct nv30_miptree *)pt;
47
struct pipe_resource *
48
nv30_miptree_create(struct pipe_screen *, const struct pipe_resource *);
50
struct pipe_resource *
51
nv30_miptree_from_handle(struct pipe_screen *, const struct pipe_resource *,
52
struct winsys_handle *);
55
nv30_miptree_surface_new(struct pipe_context *, struct pipe_resource *,
56
const struct pipe_surface *);
59
nv30_miptree_surface_del(struct pipe_context *, struct pipe_surface *);
62
nv30_miptree_get_handle(struct pipe_screen *pscreen,
63
struct pipe_context *context,
64
struct pipe_resource *pt,
65
struct winsys_handle *handle,
69
nv30_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt);
72
nv30_resource_copy_region(struct pipe_context *pipe,
73
struct pipe_resource *dst, unsigned dst_level,
74
unsigned dstx, unsigned dsty, unsigned dstz,
75
struct pipe_resource *src, unsigned src_level,
76
const struct pipe_box *src_box);
79
nv30_blit(struct pipe_context *pipe,
80
const struct pipe_blit_info *blit_info);
83
nv30_flush_resource(struct pipe_context *pipe,
84
struct pipe_resource *resource);
87
nv30_miptree_transfer_map(struct pipe_context *pipe, struct pipe_resource *pt,
88
unsigned level, unsigned usage,
89
const struct pipe_box *box,
90
struct pipe_transfer **ptransfer);
93
nv30_miptree_transfer_unmap(struct pipe_context *pipe,
94
struct pipe_transfer *ptx);