Lines Matching full:ctx
129 struct blitter_context_priv *ctx;
137 ctx = CALLOC_STRUCT(blitter_context_priv);
138 if (!ctx)
141 ctx->base.pipe = pipe;
142 ctx->base.draw_rectangle = util_blitter_draw_rectangle;
145 ctx->base.saved_blend_state = INVALID_PTR;
146 ctx->base.saved_dsa_state = INVALID_PTR;
147 ctx->base.saved_rs_state = INVALID_PTR;
148 ctx->base.saved_fs = INVALID_PTR;
149 ctx->base.saved_vs = INVALID_PTR;
150 ctx->base.saved_gs = INVALID_PTR;
151 ctx->base.saved_velem_state = INVALID_PTR;
152 ctx->base.saved_fb_state.nr_cbufs = ~0;
153 ctx->base.saved_num_sampler_views = ~0;
154 ctx->base.saved_num_sampler_states = ~0;
155 ctx->base.saved_num_vertex_buffers = ~0;
156 ctx->base.saved_num_so_targets = ~0;
158 ctx->has_geometry_shader =
161 ctx->vertex_has_integers =
164 ctx->has_stream_out =
168 ctx->has_stencil_export =
174 ctx->blend_keep_color = pipe->create_blend_state(pipe, &blend);
177 ctx->blend_write_color = pipe->create_blend_state(pipe, &blend);
181 ctx->dsa_keep_depth_stencil =
187 ctx->dsa_write_depth_keep_stencil =
197 ctx->dsa_write_depth_stencil =
202 ctx->dsa_keep_depth_write_stencil =
211 ctx->sampler_state = pipe->create_sampler_state(pipe, &sampler_state);
219 ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state);
221 if (ctx->has_stream_out) {
223 ctx->rs_discard_state = pipe->create_rasterizer_state(pipe, &rs_state);
232 ctx->velem_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]);
234 if (ctx->vertex_has_integers) {
240 ctx->velem_sint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]);
247 ctx->velem_uint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]);
250 if (ctx->has_stream_out) {
252 ctx->velem_state_readbuf = pipe->create_vertex_elements_state(pipe, 1, &velem[0]);
262 ctx->vs =
266 if (ctx->has_stream_out) {
276 ctx->vs_pos_only =
283 ctx->vertices[i][0][3] = 1; /*v.w*/
285 ctx->upload = u_upload_create(pipe, 65536, 4, PIPE_BIND_VERTEX_BUFFER);
287 return &ctx->base;
292 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
296 pipe->delete_blend_state(pipe, ctx->blend_write_color);
297 pipe->delete_blend_state(pipe, ctx->blend_keep_color);
298 pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
300 ctx->dsa_write_depth_keep_stencil);
301 pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
302 pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
304 pipe->delete_rasterizer_state(pipe, ctx->rs_state);
305 if (ctx->rs_discard_state)
306 pipe->delete_rasterizer_state(pipe, ctx->rs_discard_state);
307 pipe->delete_vs_state(pipe, ctx->vs);
308 if (ctx->vs_pos_only)
309 pipe->delete_vs_state(pipe, ctx->vs_pos_only);
310 pipe->delete_vertex_elements_state(pipe, ctx->velem_state);
311 if (ctx->vertex_has_integers) {
312 pipe->delete_vertex_elements_state(pipe, ctx->velem_sint_state);
313 pipe->delete_vertex_elements_state(pipe, ctx->velem_uint_state);
315 if (ctx->velem_state_readbuf)
316 pipe->delete_vertex_elements_state(pipe, ctx->velem_state_readbuf);
319 if (ctx->fs_texfetch_col[i])
320 pipe->delete_fs_state(pipe, ctx->fs_texfetch_col[i]);
321 if (ctx->fs_texfetch_depth[i])
322 pipe->delete_fs_state(pipe, ctx->fs_texfetch_depth[i]);
323 if (ctx->fs_texfetch_depthstencil[i])
324 pipe->delete_fs_state(pipe, ctx->fs_texfetch_depthstencil[i]);
325 if (ctx->fs_texfetch_stencil[i])
326 pipe->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]);
330 if (ctx->fs_col[i])
331 pipe->delete_fs_state(pipe, ctx->fs_col[i]);
332 if (ctx->fs_col_int[i])
333 pipe->delete_fs_state(pipe, ctx->fs_col_int[i]);
336 pipe->delete_sampler_state(pipe, ctx->sampler_state);
337 u_upload_destroy(ctx->upload);
338 FREE(ctx);
341 static void blitter_set_running_flag(struct blitter_context_priv *ctx)
343 if (ctx->base.running) {
347 ctx->base.running = TRUE;
350 static void blitter_unset_running_flag(struct blitter_context_priv *ctx)
352 if (!ctx->base.running) {
356 ctx->base.running = FALSE;
359 static void blitter_check_saved_vertex_states(struct blitter_context_priv *ctx)
361 assert(ctx->base.saved_num_vertex_buffers != ~0);
362 assert(ctx->base.saved_velem_state != INVALID_PTR);
363 assert(ctx->base.saved_vs != INVALID_PTR);
364 assert(!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR);
365 assert(!ctx->has_stream_out || ctx->base.saved_num_so_targets != ~0);
366 assert(ctx->base.saved_rs_state != INVALID_PTR);
369 static void blitter_restore_vertex_states(struct blitter_context_priv *ctx)
371 struct pipe_context *pipe = ctx->base.pipe;
376 ctx->base.saved_num_vertex_buffers,
377 ctx->base.saved_vertex_buffers);
379 for (i = 0; i < ctx->base.saved_num_vertex_buffers; i++) {
380 if (ctx->base.saved_vertex_buffers[i].buffer) {
381 pipe_resource_reference(&ctx->base.saved_vertex_buffers[i].buffer,
385 ctx->base.saved_num_vertex_buffers = ~0;
388 pipe->bind_vertex_elements_state(pipe, ctx->base.saved_velem_state);
389 ctx->base.saved_velem_state = INVALID_PTR;
392 pipe->bind_vs_state(pipe, ctx->base.saved_vs);
393 ctx->base.saved_vs = INVALID_PTR;
396 if (ctx->has_geometry_shader) {
397 pipe->bind_gs_state(pipe, ctx->base.saved_gs);
398 ctx->base.saved_gs = INVALID_PTR;
402 if (ctx->has_stream_out) {
404 ctx->base.saved_num_so_targets,
405 ctx->base.saved_so_targets, ~0);
407 for (i = 0; i < ctx->base.saved_num_so_targets; i++)
408 pipe_so_target_reference(&ctx->base.saved_so_targets[i], NULL);
410 ctx->base.saved_num_so_targets = ~0;
414 pipe->bind_rasterizer_state(pipe, ctx->base.saved_rs_state);
415 ctx->base.saved_rs_state = INVALID_PTR;
418 static void blitter_check_saved_fragment_states(struct blitter_context_priv *ctx)
420 assert(ctx->base.saved_fs != INVALID_PTR);
421 assert(ctx->base.saved_dsa_state != INVALID_PTR);
422 assert(ctx->base.saved_blend_state != INVALID_PTR);
425 static void blitter_restore_fragment_states(struct blitter_context_priv *ctx)
427 struct pipe_context *pipe = ctx->base.pipe;
430 pipe->bind_fs_state(pipe, ctx->base.saved_fs);
431 ctx->base.saved_fs = INVALID_PTR;
434 pipe->bind_depth_stencil_alpha_state(pipe, ctx->base.saved_dsa_state);
435 ctx->base.saved_dsa_state = INVALID_PTR;
438 pipe->bind_blend_state(pipe, ctx->base.saved_blend_state);
439 ctx->base.saved_blend_state = INVALID_PTR;
442 if (ctx->base.is_sample_mask_saved) {
443 pipe->set_sample_mask(pipe, ctx->base.saved_sample_mask);
444 ctx->base.is_sample_mask_saved = FALSE;
450 pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref);
451 pipe->set_viewport_state(pipe, &ctx->base.saved_viewport);
454 static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx)
456 assert(ctx->base.saved_fb_state.nr_cbufs != ~0);
459 static void blitter_restore_fb_state(struct blitter_context_priv *ctx)
461 struct pipe_context *pipe = ctx->base.pipe;
463 pipe->set_framebuffer_state(pipe, &ctx->base.saved_fb_state);
464 util_unreference_framebuffer_state(&ctx->base.saved_fb_state);
467 ctx)
469 assert(ctx->base.saved_num_sampler_states != ~0);
470 assert(ctx->base.saved_num_sampler_views != ~0);
473 static void blitter_restore_textures(struct blitter_context_priv *ctx)
475 struct pipe_context *pipe = ctx->base.pipe;
480 ctx->base.saved_num_sampler_states,
481 ctx->base.saved_sampler_states);
482 ctx->base.saved_num_sampler_states = ~0;
486 ctx->base.saved_num_sampler_views,
487 ctx->base.saved_sampler_views);
489 for (i = 0; i < ctx->base.saved_num_sampler_views; i++)
490 pipe_sampler_view_reference(&ctx->base.saved_sampler_views[i], NULL);
492 ctx->base.saved_num_sampler_views = ~0;
495 static void blitter_set_rectangle(struct blitter_context_priv *ctx,
503 ctx->vertices[0][0][0] = (float)x1 / ctx->dst_width * 2.0f - 1.0f; /*v0.x*/
504 ctx->vertices[0][0][1] = (float)y1 / ctx->dst_height * 2.0f - 1.0f; /*v0.y*/
506 ctx->vertices[1][0][0] = (float)x2 / ctx->dst_width * 2.0f - 1.0f; /*v1.x*/
507 ctx->vertices[1][0][1] = (float)y1 / ctx->dst_height * 2.0f - 1.0f; /*v1.y*/
509 ctx->vertices[2][0][0] = (float)x2 / ctx->dst_width * 2.0f - 1.0f; /*v2.x*/
510 ctx->vertices[2][0][1] = (float)y2 / ctx->dst_height * 2.0f - 1.0f; /*v2.y*/
512 ctx->vertices[3][0][0] = (float)x1 / ctx->dst_width * 2.0f - 1.0f; /*v3.x*/
513 ctx->vertices[3][0][1] = (float)y2 / ctx->dst_height * 2.0f - 1.0f; /*v3.y*/
516 ctx->vertices[i][0][2] = depth; /*z*/
519 ctx->viewport.scale[0] = 0.5f * ctx->dst_width;
520 ctx->viewport.scale[1] = 0.5f * ctx->dst_height;
521 ctx->viewport.scale[2] = 1.0f;
522 ctx->viewport.scale[3] = 1.0f;
523 ctx->viewport.translate[0] = 0.5f * ctx->dst_width;
524 ctx->viewport.translate[1] = 0.5f * ctx->dst_height;
525 ctx->viewport.translate[2] = 0.0f;
526 ctx->viewport.translate[3] = 0.0f;
527 ctx->base.pipe->set_viewport_state(ctx->base.pipe, &ctx->viewport);
530 static void blitter_set_clear_color(struct blitter_context_priv *ctx,
537 uint32_t *uiverts = (uint32_t *)ctx->vertices[i][1];
545 ctx->vertices[i][1][0] = 0;
546 ctx->vertices[i][1][1] = 0;
547 ctx->vertices[i][1][2] = 0;
548 ctx->vertices[i][1][3] = 0;
593 static void blitter_set_texcoords(struct blitter_context_priv *ctx,
611 &ctx->vertices[0][1][0], 8);
613 set_texcoords_in_vertices(coord, &ctx->vertices[0][1][0], 8);
623 ctx->vertices[i][1][2] = r; /*r*/
629 ctx->vertices[i][1][1] = layer; /*t*/
634 ctx->vertices[i][1][2] = layer; /*r*/
635 ctx->vertices[i][1][3] = sample; /*q*/
641 ctx->vertices[i][1][2] = sample; /*r*/
649 static void blitter_set_dst_dimensions(struct blitter_context_priv *ctx,
652 ctx->dst_width = width;
653 ctx->dst_height = height;
657 void *blitter_get_fs_col(struct blitter_context_priv *ctx, unsigned num_cbufs,
660 struct pipe_context *pipe = ctx->base.pipe;
665 if (!ctx->fs_col_int[num_cbufs])
666 ctx->fs_col_int[num_cbufs] =
670 return ctx->fs_col_int[num_cbufs];
672 if (!ctx->fs_col[num_cbufs])
673 ctx->fs_col[num_cbufs] =
677 return ctx->fs_col[num_cbufs];
682 void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx,
685 struct pipe_context *pipe = ctx->base.pipe;
690 void **shader = &ctx->fs_texfetch_col_msaa[tex->target];
702 void **shader = &ctx->fs_texfetch_col[tex->target];
718 void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx,
721 struct pipe_context *pipe = ctx->base.pipe;
726 void **shader = &ctx->fs_texfetch_depth_msaa[tex->target];
739 void **shader = &ctx->fs_texfetch_depth[tex->target];
755 void *blitter_get_fs_texfetch_depthstencil(struct blitter_context_priv *ctx,
758 struct pipe_context *pipe = ctx->base.pipe;
763 void **shader = &ctx->fs_texfetch_depthstencil_msaa[tex->target];
776 void **shader = &ctx->fs_texfetch_depthstencil[tex->target];
792 void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
795 struct pipe_context *pipe = ctx->base.pipe;
800 void **shader = &ctx->fs_texfetch_stencil_msaa[tex->target];
813 void **shader = &ctx->fs_texfetch_stencil[tex->target];
828 static void blitter_set_common_draw_rect_state(struct blitter_context_priv *ctx)
830 struct pipe_context *pipe = ctx->base.pipe;
832 pipe->bind_rasterizer_state(pipe, ctx->rs_state);
833 pipe->bind_vs_state(pipe, ctx->vs);
834 if (ctx->has_geometry_shader)
836 if (ctx->has_stream_out)
840 static void blitter_draw(struct blitter_context_priv *ctx,
848 blitter_set_rectangle(ctx, x1, y1, x2, y2, depth);
850 u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), ctx->vertices,
852 u_upload_unmap(ctx->upload);
853 util_draw_vertex_buffer(ctx->base.pipe, NULL, buf, offset,
865 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
869 blitter_set_clear_color(ctx, attrib);
873 set_texcoords_in_vertices(attrib->f, &ctx->vertices[0][1][0], 8);
879 blitter_draw(ctx, x1, y1, x2, y2, depth);
891 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
892 struct pipe_context *pipe = ctx->base.pipe;
897 blitter_set_running_flag(ctx);
898 blitter_check_saved_vertex_states(ctx);
899 blitter_check_saved_fragment_states(ctx);
905 pipe->bind_blend_state(pipe, ctx->blend_write_color);
907 pipe->bind_blend_state(pipe, ctx->blend_keep_color);
913 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
915 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil);
917 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
919 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
926 pipe->bind_vertex_elements_state(pipe, ctx->velem_sint_state);
928 pipe->bind_vertex_elements_state(pipe, ctx->velem_uint_state);
930 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
932 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, num_cbufs, int_format));
935 blitter_set_common_draw_rect_state(ctx);
936 blitter_set_dst_dimensions(ctx, width, height);
940 blitter_restore_vertex_states(ctx);
941 blitter_restore_fragment_states(ctx);
942 blitter_unset_running_flag(ctx);
1032 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1033 struct pipe_screen *screen = ctx->base.pipe->screen;
1044 if ((mask & PIPE_MASK_S) && is_stencil && !ctx->has_stencil_export) {
1090 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1091 struct pipe_context *pipe = ctx->base.pipe;
1125 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1126 struct pipe_context *pipe = ctx->base.pipe;
1140 if (blit_stencil && !ctx->has_stencil_export) {
1156 blitter_set_running_flag(ctx);
1157 blitter_check_saved_vertex_states(ctx);
1158 blitter_check_saved_fragment_states(ctx);
1159 blitter_check_saved_textures(ctx);
1160 blitter_check_saved_fb_state(ctx);
1167 pipe->bind_blend_state(pipe, ctx->blend_keep_color);
1171 ctx->dsa_write_depth_stencil);
1173 blitter_get_fs_texfetch_depthstencil(ctx, src->texture));
1176 ctx->dsa_write_depth_keep_stencil);
1178 blitter_get_fs_texfetch_depth(ctx, src->texture));
1181 ctx->dsa_keep_depth_write_stencil);
1183 blitter_get_fs_texfetch_stencil(ctx, src->texture));
1189 pipe->bind_blend_state(pipe, ctx->blend_write_color);
1190 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
1192 blitter_get_fs_texfetch_col(ctx, src->texture));
1203 void *samplers[2] = {ctx->sampler_state, ctx->sampler_state};
1228 pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state);
1233 pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state);
1236 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
1240 blitter_set_common_draw_rect_state(ctx);
1241 blitter_set_dst_dimensions(ctx, dst->width, dst->height);
1263 blitter_set_texcoords(ctx, src, src_width0, src_height0, srcbox->z,
1267 blitter_draw(ctx, dstx, dsty, dstx+abs_width, dsty+abs_height, 0);
1270 blitter_restore_vertex_states(ctx);
1271 blitter_restore_fragment_states(ctx);
1272 blitter_restore_textures(ctx);
1273 blitter_restore_fb_state(ctx);
1274 blitter_unset_running_flag(ctx);
1284 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1285 struct pipe_context *pipe = ctx->base.pipe;
1293 blitter_set_running_flag(ctx);
1294 blitter_check_saved_vertex_states(ctx);
1295 blitter_check_saved_fragment_states(ctx);
1296 blitter_check_saved_fb_state(ctx);
1299 pipe->bind_blend_state(pipe, ctx->blend_write_color);
1300 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
1301 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE));
1302 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
1313 blitter_set_common_draw_rect_state(ctx);
1314 blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
1318 blitter_restore_vertex_states(ctx);
1319 blitter_restore_fragment_states(ctx);
1320 blitter_restore_fb_state(ctx);
1321 blitter_unset_running_flag(ctx);
1333 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1334 struct pipe_context *pipe = ctx->base.pipe;
1343 blitter_set_running_flag(ctx);
1344 blitter_check_saved_vertex_states(ctx);
1345 blitter_check_saved_fragment_states(ctx);
1346 blitter_check_saved_fb_state(ctx);
1349 pipe->bind_blend_state(pipe, ctx->blend_keep_color);
1352 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil);
1356 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil);
1360 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil);
1365 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
1367 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 0, FALSE));
1368 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
1379 ctx);
1380 blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
1384 blitter_restore_vertex_states(ctx);
1385 blitter_restore_fragment_states(ctx);
1386 blitter_restore_fb_state(ctx);
1387 blitter_unset_running_flag(ctx);
1397 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1398 struct pipe_context *pipe = ctx->base.pipe;
1406 blitter_set_running_flag(ctx);
1407 blitter_check_saved_vertex_states(ctx);
1408 blitter_check_saved_fragment_states(ctx);
1409 blitter_check_saved_fb_state(ctx);
1412 pipe->bind_blend_state(pipe, ctx->blend_write_color);
1414 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 0, FALSE));
1415 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
1432 blitter_set_common_draw_rect_state(ctx);
1433 blitter_set_dst_dimensions(ctx, zsurf->width, zsurf->height);
1437 blitter_restore_vertex_states(ctx);
1438 blitter_restore_fragment_states(ctx);
1439 blitter_restore_fb_state(ctx);
1440 blitter_unset_running_flag(ctx);
1450 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1451 struct pipe_context *pipe = ctx->base.pipe;
1468 assert(ctx->has_stream_out);
1472 !ctx->has_stream_out) {
1479 blitter_set_running_flag(ctx);
1480 blitter_check_saved_vertex_states(ctx);
1487 pipe->bind_vertex_elements_state(pipe, ctx->velem_state_readbuf);
1488 pipe->bind_vs_state(pipe, ctx->vs_pos_only);
1489 if (ctx->has_geometry_shader)
1491 pipe->bind_rasterizer_state(pipe, ctx->rs_discard_state);
1498 blitter_restore_vertex_states(ctx);
1499 blitter_unset_running_flag(ctx);
1513 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1514 struct pipe_context *pipe = ctx->base.pipe;
1518 blitter_set_running_flag(ctx);
1519 blitter_check_saved_vertex_states(ctx);
1520 blitter_check_saved_fragment_states(ctx);
1524 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
1525 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
1526 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE));
1553 blitter_set_common_draw_rect_state(ctx);
1554 blitter_set_dst_dimensions(ctx, src->width0, src->height0);
1557 blitter_restore_fb_state(ctx);
1558 blitter_restore_vertex_states(ctx);
1559 blitter_restore_fragment_states(ctx);
1560 blitter_unset_running_flag(ctx);
1570 struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
1571 struct pipe_context *pipe = ctx->base.pipe;
1579 blitter_set_running_flag(ctx);
1580 blitter_check_saved_vertex_states(ctx);
1581 blitter_check_saved_fragment_states(ctx);
1582 blitter_check_saved_fb_state(ctx);
1586 pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil);
1587 pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE));
1588 pipe->bind_vertex_elements_state(pipe, ctx->velem_state);
1600 blitter_set_common_draw_rect_state(ctx);
1601 blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height);
1605 blitter_restore_vertex_states(ctx);
1606 blitter_restore_fragment_states(ctx);
1607 blitter_restore_fb_state(ctx);
1608 blitter_unset_running_flag(ctx);