Home | History | Annotate | Download | only in svga

Lines Matching refs:svga

51 static void set_draw_viewport( struct svga_context *svga )
53 struct pipe_viewport_state vp = svga->curr.viewport;
57 if (svga_have_vgpu10(svga)) {
58 if (svga->curr.reduced_prim == PIPE_PRIM_TRIANGLES) {
63 switch (svga->curr.reduced_prim) {
73 if (svga->curr.rast->need_pipeline & SVGA_PIPELINE_FLAG_LINES)
93 draw_set_viewport_states(svga->swtnl.draw, 0, 1, &vp);
97 update_swtnl_draw( struct svga_context *svga,
100 SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SWTNLUPDATEDRAW);
102 draw_flush( svga->swtnl.draw );
105 draw_bind_vertex_shader(svga->swtnl.draw,
106 svga->curr.vs->draw_shader);
109 draw_bind_fragment_shader(svga->swtnl.draw,
110 svga->curr.fs->draw_shader);
113 draw_set_vertex_buffers(svga->swtnl.draw, 0,
114 svga->curr.num_vertex_buffers,
115 svga->curr.vb);
118 draw_set_vertex_elements(svga->swtnl.draw,
119 svga->curr.velems->count,
120 svga->curr.velems->velem );
123 draw_set_clip_state(svga->swtnl.draw,
124 &svga->curr.clip);
129 set_draw_viewport( svga );
132 draw_set_rasterizer_state(svga->swtnl.draw,
133 &svga->curr.rast->templ,
134 (void *) svga->curr.rast);
142 draw_set_zs_format(svga->swtnl.draw,
143 (svga->curr.framebuffer.zsbuf) ?
144 svga->curr.framebuffer.zsbuf->format : PIPE_FORMAT_NONE);
146 SVGA_STATS_TIME_POP(svga_sws(svga));
186 svga_vdecl_to_input_element(struct svga_context *svga,
195 assert(svga_have_vgpu10(svga));
206 id = util_bitmask_add(svga->input_element_object_id_bm);
208 ret = SVGA3D_vgpu10_DefineElementLayout(svga->swc, num_decls, id, elements);
210 svga_context_flush(svga, NULL);
211 ret = SVGA3D_vgpu10_DefineElementLayout(svga->swc, num_decls, id, elements);
220 svga_swtnl_update_vdecl( struct svga_context *svga )
222 struct svga_vbuf_render *svga_render = svga_vbuf_render(svga->swtnl.backend);
223 struct draw_context *draw = svga->swtnl.draw;
226 struct svga_fragment_shader *fs = svga->curr.fs;
233 SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SWTNLUPDATEVDECL);
303 if (svga_have_vgpu10(svga)) {
312 ret = SVGA3D_vgpu10_DestroyElementLayout(svga->swc,
315 svga_context_flush(svga, NULL);
316 ret = SVGA3D_vgpu10_DestroyElementLayout(svga->swc,
326 if (svga->state.hw_draw.layout_id == svga_render->layout_id)
327 svga->state.hw_draw.layout_id = SVGA3D_INVALID_ID;
329 util_bitmask_clear(svga->input_element_object_id_bm,
334 svga_vdecl_to_input_element(svga, vdecl, nr_decls);
337 if (svga->state.hw_draw.layout_id != svga_render->layout_id) {
338 ret = SVGA3D_vgpu10_SetInputLayout(svga->swc, svga_render->layout_id);
340 svga_context_flush(svga, NULL);
341 ret = SVGA3D_vgpu10_SetInputLayout(svga->swc,
346 svga->state.hw_draw.layout_id = svga_render->layout_id;
355 svga->swtnl.new_vdecl = TRUE;
358 SVGA_STATS_TIME_POP(svga_sws(svga));
364 update_swtnl_vdecl( struct svga_context *svga,
367 return svga_swtnl_update_vdecl( svga );