Debian Codegraph @

src/gallium/drivers/nouveau/nv30/nv30_resource.h

raw
1 #ifndef __NV30_RESOURCE_H__
2 #define __NV30_RESOURCE_H__
3
4 #include "nouveau_buffer.h"
5
6 void nv30_resource_screen_init(struct pipe_screen *);
7 void nv30_resource_init(struct pipe_context *);
8
9 struct nv30_surface {
10 struct pipe_surface base;
11 uint32_t offset;
12 uint32_t pitch;
13 uint32_t width;
14 uint16_t height;
15 uint16_t depth;
16 };
17
18 static inline struct nv30_surface *
19 nv30_surface(struct pipe_surface *ps)
20 {
21 return (struct nv30_surface *)ps;
22 }
23
24 struct nv30_miptree_level {
25 uint32_t offset;
26 uint32_t pitch;
27 uint32_t zslice_size;
28 };
29
30 struct nv30_miptree {
31 struct nv04_resource base;
32 struct nv30_miptree_level level[13];
33 uint32_t uniform_pitch;
34 uint32_t layer_size;
35 bool swizzled;
36 unsigned ms_mode;
37 unsigned ms_x:1;
38 unsigned ms_y:1;
39 };
40
41 static inline struct nv30_miptree *
42 nv30_miptree(struct pipe_resource *pt)
43 {
44 return (struct nv30_miptree *)pt;
45 }
46
47 struct pipe_resource *
48 nv30_miptree_create(struct pipe_screen *, const struct pipe_resource *);
49
50 struct pipe_resource *
51 nv30_miptree_from_handle(struct pipe_screen *, const struct pipe_resource *,
52 struct winsys_handle *);
53
54 void
55 nv30_framebuffer_init(struct pipe_context *pctx,
56 const struct pipe_framebuffer_state *fb,
57 struct pipe_surface **cbufs,
58 struct pipe_surface **zsbuf);
59
60 bool
61 nv30_miptree_get_handle(struct pipe_screen *pscreen,
62 struct pipe_context *context,
63 struct pipe_resource *pt,
64 struct winsys_handle *handle,
65 unsigned usage);
66
67 void
68 nv30_miptree_destroy(struct pipe_screen *pscreen, struct pipe_resource *pt);
69
70 void
71 nv30_resource_copy_region(struct pipe_context *pipe,
72 struct pipe_resource *dst, unsigned dst_level,
73 unsigned dstx, unsigned dsty, unsigned dstz,
74 struct pipe_resource *src, unsigned src_level,
75 const struct pipe_box *src_box);
76
77 void
78 nv30_blit(struct pipe_context *pipe,
79 const struct pipe_blit_info *blit_info);
80
81 void
82 nv30_flush_resource(struct pipe_context *pipe,
83 struct pipe_resource *resource);
84
85 void *
86 nv30_miptree_transfer_map(struct pipe_context *pipe, struct pipe_resource *pt,
87 unsigned level, unsigned usage,
88 const struct pipe_box *box,
89 struct pipe_transfer **ptransfer);
90
91 void
92 nv30_miptree_transfer_unmap(struct pipe_context *pipe,
93 struct pipe_transfer *ptx);
94
95 #endif