Home | History | Annotate | Download | only in svga

Lines Matching refs:svga

56    struct svga_context *svga = svga_context( pipe );
59 svga_cleanup_framebuffer( svga );
60 svga_cleanup_tss_binding( svga );
62 svga_hwtnl_destroy( svga->hwtnl );
64 svga_cleanup_vertex_state(svga);
66 svga->swc->destroy(svga->swc);
68 svga_destroy_swtnl( svga );
70 u_upload_destroy( svga->upload_vb );
71 u_upload_destroy( svga->upload_ib );
73 util_bitmask_destroy( svga->vs_bm );
74 util_bitmask_destroy( svga->fs_bm );
77 pipe_resource_reference( &svga->curr.cb[shader], NULL );
79 FREE( svga );
88 struct svga_context *svga = NULL;
91 svga = CALLOC_STRUCT(svga_context);
92 if (svga == NULL)
95 svga->pipe.screen = screen;
96 svga->pipe.priv = priv;
97 svga->pipe.destroy = svga_destroy;
98 svga->pipe.clear = svga_clear;
100 svga->swc = svgascreen->sws->context_create(svgascreen->sws);
101 if(!svga->swc)
104 svga_init_resource_functions(svga);
105 svga_init_blend_functions(svga);
106 svga_init_blit_functions(svga);
107 svga_init_depth_stencil_functions(svga);
108 svga_init_draw_functions(svga);
109 svga_init_flush_functions(svga);
110 svga_init_misc_functions(svga);
111 svga_init_rasterizer_functions(svga);
112 svga_init_sampler_functions(svga);
113 svga_init_fs_functions(svga);
114 svga_init_vs_functions(svga);
115 svga_init_vertex_functions(svga);
116 svga_init_constbuffer_functions(svga);
117 svga_init_query_functions(svga);
118 svga_init_surface_functions(svga);
122 svga->debug.no_swtnl = debug_get_option_no_swtnl();
123 svga->debug.force_swtnl = debug_get_option_force_swtnl();
124 svga->debug.use_min_mipmap = debug_get_option_use_min_mipmap();
125 svga->debug.disable_shader = debug_get_option_disable_shader();
126 svga->debug.no_line_width = debug_get_option_no_line_width();
127 svga->debug.force_hw_line_stipple = debug_get_option_force_hw_line_stipple();
129 svga->fs_bm = util_bitmask_create();
130 if (svga->fs_bm == NULL)
133 svga->vs_bm = util_bitmask_create();
134 if (svga->vs_bm == NULL)
137 svga->upload_ib = u_upload_create( &svga->pipe,
141 if (svga->upload_ib == NULL)
144 svga->upload_vb = u_upload_create( &svga->pipe,
148 if (svga->upload_vb == NULL)
151 svga->hwtnl = svga_hwtnl_create( svga,
152 svga->upload_ib,
153 svga->swc );
154 if (svga->hwtnl == NULL)
157 if (!svga_init_swtnl(svga))
160 ret = svga_emit_initial_state( svga );
166 memset(&svga->state.hw_clear, 0xcd, sizeof(svga->state.hw_clear));
167 memset(&svga->state.hw_clear.framebuffer, 0x0,
168 sizeof(svga->state.hw_clear.framebuffer));
170 memset(&svga->state.hw_draw, 0xcd, sizeof(svga->state.hw_draw));
171 memset(&svga->state.hw_draw.views, 0x0, sizeof(svga->state.hw_draw.views));
172 svga->state.hw_draw.num_views = 0;
174 svga->dirty = ~0;
176 LIST_INITHEAD(&svga->dirty_buffers);
178 return &svga->pipe;
181 svga_destroy_swtnl(svga);
183 svga_hwtnl_destroy( svga->hwtnl );
185 u_upload_destroy( svga->upload_vb );
187 u_upload_destroy( svga->upload_ib );
189 util_bitmask_destroy( svga->vs_bm );
191 util_bitmask_destroy( svga->fs_bm );
193 svga->swc->destroy(svga->swc);
195 FREE(svga);
201 void svga_context_flush( struct svga_context *svga,
204 struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
207 svga->curr.nr_fbs = 0;
214 u_upload_flush(svga->upload_vb);
215 u_upload_flush(svga->upload_ib);
220 svga_context_flush_buffers(svga);
224 svga->swc->flush(svga->swc, &fence);
231 svga->rebind.rendertargets = TRUE;
232 svga->rebind.texture_samplers = TRUE;
236 svga->pipe.screen->fence_finish( svga->pipe.screen, fence,
247 void svga_hwtnl_flush_retry( struct svga_context *svga )
251 ret = svga_hwtnl_flush( svga->hwtnl );
253 svga_context_flush( svga, NULL );
254 ret = svga_hwtnl_flush( svga->hwtnl );
266 void svga_hwtnl_flush_buffer( struct svga_context *svga,
269 if (svga_hwtnl_is_buffer_referred(svga->hwtnl, buffer)) {
270 svga_hwtnl_flush_retry(svga);
277 void svga_surfaces_flush(struct svga_context *svga)
283 svga_hwtnl_flush_retry( svga );
288 if (svga->curr.framebuffer.cbufs[i])
289 svga_propagate_surface(svga, svga->curr.framebuffer.cbufs[i]);
292 if (svga->curr.framebuffer.zsbuf)
293 svga_propagate_surface(svga, svga->curr.framebuffer.zsbuf);