nv50: fix bogus error message about 3d surfaces
[mesa.git] / src / gallium / drivers / nvfx / nvfx_screen.h
1 #ifndef __NVFX_SCREEN_H__
2 #define __NVFX_SCREEN_H__
3
4 #include "pipe/p_compiler.h"
5 #include "util/u_double_list.h"
6 #include "nouveau/nouveau_screen.h"
7
8 struct pipe_screen;
9
10 struct nvfx_screen {
11 struct nouveau_screen base;
12
13 struct nouveau_winsys *nvws;
14 struct nouveau_bo *fence;
15
16 struct nvfx_context *cur_ctx;
17
18 unsigned is_nv4x; /* either 0 or ~0 */
19 unsigned use_nv4x; /* either 0 or ~0 */
20 boolean force_swtnl;
21 boolean trace_draw;
22 unsigned vertex_buffer_reloc_flags;
23 unsigned index_buffer_reloc_flags;
24 unsigned advertise_fp16;
25 unsigned advertise_fp32;
26 unsigned advertise_npot;
27 unsigned advertise_blend_equation_separate;
28
29 /* HW graphics objects */
30 struct nouveau_grobj *eng3d;
31 struct nouveau_notifier *sync;
32
33 /* Query object resources */
34 struct nouveau_notifier *query;
35 struct nouveau_resource *query_heap;
36 struct list_head query_list;
37
38 /* Vtxprog resources */
39 struct nouveau_resource *vp_exec_heap;
40 struct nouveau_resource *vp_data_heap;
41
42 struct nv04_2d_context* eng2d;
43
44 /* Once the amount of bytes drawn from the buffer reaches the updated size times this value,
45 * we will assume that the buffer will be drawn an huge number of times before the
46 * next modification
47 */
48 float static_reuse_threshold;
49
50 /* Cost of allocating a buffer in terms of the cost of copying a byte to an hardware buffer */
51 unsigned buffer_allocation_cost;
52
53 /* inline_cost/hardware_cost conversion ration */
54 float inline_cost_per_hardware_cost;
55 };
56
57 static INLINE struct nvfx_screen *
58 nvfx_screen(struct pipe_screen *screen)
59 {
60 return (struct nvfx_screen *)screen;
61 }
62
63 int nvfx_screen_surface_init(struct pipe_screen *pscreen);
64 void nvfx_screen_surface_takedown(struct pipe_screen *pscreen);
65
66 #endif