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
;
14 struct nouveau_bo
*fence
;
16 struct nvfx_context
*cur_ctx
;
18 unsigned is_nv4x
; /* either 0 or ~0 */
19 unsigned use_nv4x
; /* either 0 or ~0 */
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
;
29 /* HW graphics objects */
30 struct nouveau_grobj
*eng3d
;
31 struct nouveau_notifier
*sync
;
33 /* Query object resources */
34 struct nouveau_notifier
*query
;
35 struct nouveau_resource
*query_heap
;
36 struct list_head query_list
;
38 /* Vtxprog resources */
39 struct nouveau_resource
*vp_exec_heap
;
40 struct nouveau_resource
*vp_data_heap
;
42 struct nv04_2d_context
* eng2d
;
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
48 float static_reuse_threshold
;
50 /* Cost of allocating a buffer in terms of the cost of copying a byte to an hardware buffer */
51 unsigned buffer_allocation_cost
;
53 /* inline_cost/hardware_cost conversion ration */
54 float inline_cost_per_hardware_cost
;
57 static INLINE
struct nvfx_screen
*
58 nvfx_screen(struct pipe_screen
*screen
)
60 return (struct nvfx_screen
*)screen
;
63 int nvfx_screen_surface_init(struct pipe_screen
*pscreen
);
64 void nvfx_screen_surface_takedown(struct pipe_screen
*pscreen
);