docs: Update status of GL 3.x related extensions
[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
15 struct nvfx_context *cur_ctx;
16
17 unsigned is_nv4x; /* either 0 or ~0 */
18 unsigned use_nv4x; /* either 0 or ~0 */
19 boolean force_swtnl;
20 boolean trace_draw;
21 unsigned vertex_buffer_reloc_flags;
22 unsigned index_buffer_reloc_flags;
23 unsigned advertise_fp16;
24 unsigned advertise_fp32;
25 unsigned advertise_npot;
26 unsigned advertise_blend_equation_separate;
27
28 /* HW graphics objects */
29 struct nouveau_grobj *eng3d;
30 struct nouveau_notifier *sync;
31
32 /* Query object resources */
33 struct nouveau_notifier *query;
34 struct nouveau_resource *query_heap;
35 struct list_head query_list;
36
37 /* Vtxprog resources */
38 struct nouveau_resource *vp_exec_heap;
39 struct nouveau_resource *vp_data_heap;
40
41 struct nv04_2d_context* eng2d;
42
43 /* Once the amount of bytes drawn from the buffer reaches the updated size times this value,
44 * we will assume that the buffer will be drawn an huge number of times before the
45 * next modification
46 */
47 float static_reuse_threshold;
48
49 /* Cost of allocating a buffer in terms of the cost of copying a byte to an hardware buffer */
50 unsigned buffer_allocation_cost;
51
52 /* inline_cost/hardware_cost conversion ration */
53 float inline_cost_per_hardware_cost;
54 };
55
56 static INLINE struct nvfx_screen *
57 nvfx_screen(struct pipe_screen *screen)
58 {
59 return (struct nvfx_screen *)screen;
60 }
61
62 int nvfx_screen_surface_init(struct pipe_screen *pscreen);
63 void nvfx_screen_surface_takedown(struct pipe_screen *pscreen);
64
65 #endif