blob: d699895729daa208437886eb488c9bd285da434b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#ifndef __NVC0_RESOURCE_H__
#define __NVC0_RESOURCE_H__
#include "nv50/nv50_resource.h"
#define NVC0_TILE_SHIFT_X(m) ((((m) >> 0) & 0xf) + 6)
#define NVC0_TILE_SHIFT_Y(m) ((((m) >> 4) & 0xf) + 3)
#define NVC0_TILE_SHIFT_Z(m) ((((m) >> 8) & 0xf) + 0)
#define NVC0_TILE_SIZE_X(m) (64 << (((m) >> 0) & 0xf))
#define NVC0_TILE_SIZE_Y(m) ( 8 << (((m) >> 4) & 0xf))
#define NVC0_TILE_SIZE_Z(m) ( 1 << (((m) >> 8) & 0xf))
/* it's ok to mask only in the end because max value is 3 * 5 */
#define NVC0_TILE_SIZE_2D(m) ((64 * 8) << (((m) + ((m) >> 4)) & 0xf))
#define NVC0_TILE_SIZE(m) ((64 * 8) << (((m) + ((m) >> 4) + ((m) >> 8)) & 0xf))
void
nvc0_init_resource_functions(struct pipe_context *pcontext);
void
nvc0_screen_init_resource_functions(struct pipe_screen *pscreen);
/* Internal functions:
*/
struct pipe_resource *
nvc0_miptree_create(struct pipe_screen *pscreen,
const struct pipe_resource *tmp);
const struct u_resource_vtbl nvc0_miptree_vtbl;
struct pipe_surface *
nvc0_miptree_surface_new(struct pipe_context *,
struct pipe_resource *,
const struct pipe_surface *templ);
unsigned
nvc0_mt_zslice_offset(const struct nv50_miptree *, unsigned l, unsigned z);
#endif
|