1 #ifndef __NVFX_SCREEN_H__
2 #define __NVFX_SCREEN_H__
4 #include "pipe/p_compiler.h"
5 #include "util/u_double_list.h"
6 #include "nouveau/nouveau_screen.h"
11 struct nouveau_screen base
;
13 struct nouveau_winsys
*nvws
;
15 struct nvfx_context
*cur_ctx
;
17 unsigned is_nv4x
; /* either 0 or ~0 */
20 unsigned vertex_buffer_reloc_flags
;
21 unsigned index_buffer_reloc_flags
;
23 /* HW graphics objects */
24 struct nouveau_grobj
*eng3d
;
25 struct nouveau_notifier
*sync
;
27 /* Query object resources */
28 struct nouveau_notifier
*query
;
29 struct nouveau_resource
*query_heap
;
30 struct list_head query_list
;
32 /* Vtxprog resources */
33 struct nouveau_resource
*vp_exec_heap
;
34 struct nouveau_resource
*vp_data_heap
;
36 struct nv04_2d_context
* eng2d
;
38 /* Once the amount of bytes drawn from the buffer reaches the updated size times this value,
39 * we will assume that the buffer will be drawn an huge number of times before the
42 float static_reuse_threshold
;
44 /* Cost of allocating a buffer in terms of the cost of copying a byte to an hardware buffer */
45 unsigned buffer_allocation_cost
;
47 /* inline_cost/hardware_cost conversion ration */
48 float inline_cost_per_hardware_cost
;
51 static INLINE
struct nvfx_screen
*
52 nvfx_screen(struct pipe_screen
*screen
)
54 return (struct nvfx_screen
*)screen
;
57 int nvfx_screen_surface_init(struct pipe_screen
*pscreen
);
58 void nvfx_screen_surface_takedown(struct pipe_screen
*pscreen
);