{
struct r600_context *rctx = (struct r600_context *)context;
+ pipe_resource_reference((struct pipe_resource**)&rctx->dummy_cmask, NULL);
+ pipe_resource_reference((struct pipe_resource**)&rctx->dummy_fmask, NULL);
+
+ if (rctx->no_blend) {
+ rctx->context.delete_blend_state(&rctx->context, rctx->no_blend);
+ }
if (rctx->dummy_pixel_shader) {
rctx->context.delete_fs_state(&rctx->context, rctx->dummy_pixel_shader);
}
if (rctx->custom_blend_resolve) {
rctx->context.delete_blend_state(&rctx->context, rctx->custom_blend_resolve);
}
+ if (rctx->custom_blend_decompress) {
+ rctx->context.delete_blend_state(&rctx->context, rctx->custom_blend_decompress);
+ }
util_unreference_framebuffer_state(&rctx->framebuffer);
r600_context_fini(rctx);
{
struct r600_context *rctx = CALLOC_STRUCT(r600_context);
struct r600_screen* rscreen = (struct r600_screen *)screen;
+ struct pipe_blend_state no_blend = {};
if (rctx == NULL)
return NULL;
rctx->family = rscreen->family;
rctx->chip_class = rscreen->chip_class;
- LIST_INITHEAD(&rctx->dirty_states);
LIST_INITHEAD(&rctx->active_timer_queries);
LIST_INITHEAD(&rctx->active_nontimer_queries);
LIST_INITHEAD(&rctx->dirty);
r600_init_query_functions(rctx);
r600_init_context_resource_functions(rctx);
r600_init_surface_functions(rctx);
- rctx->context.draw_vbo = r600_draw_vbo;
+
rctx->context.create_video_decoder = vl_create_decoder;
rctx->context.create_video_buffer = vl_video_buffer_create;
- r600_init_common_atoms(rctx);
+ r600_init_common_state_functions(rctx);
switch (rctx->chip_class) {
case R600:
if (r600_context_init(rctx))
goto fail;
rctx->custom_dsa_flush = r600_create_db_flush_dsa(rctx);
+ rctx->custom_blend_resolve = rctx->chip_class == R700 ? r700_create_resolve_blend(rctx)
+ : r600_create_resolve_blend(rctx);
+ rctx->custom_blend_decompress = r600_create_decompress_blend(rctx);
rctx->has_vertex_cache = !(rctx->family == CHIP_RV610 ||
rctx->family == CHIP_RV620 ||
rctx->family == CHIP_RS780 ||
goto fail;
rctx->custom_dsa_flush = evergreen_create_db_flush_dsa(rctx);
rctx->custom_blend_resolve = evergreen_create_resolve_blend(rctx);
+ rctx->custom_blend_decompress = evergreen_create_decompress_blend(rctx);
rctx->has_vertex_cache = !(rctx->family == CHIP_CEDAR ||
rctx->family == CHIP_PALM ||
rctx->family == CHIP_SUMO ||
rctx->cs = rctx->ws->cs_create(rctx->ws);
rctx->ws->cs_set_flush_callback(rctx->cs, r600_flush_from_winsys, rctx);
- r600_emit_atom(rctx, &rctx->start_cs_cmd.atom);
rctx->uploader = u_upload_create(&rctx->context, 1024 * 1024, 256,
PIPE_BIND_INDEX_BUFFER |
rctx->blitter = util_blitter_create(&rctx->context);
if (rctx->blitter == NULL)
goto fail;
+ rctx->blitter->draw_rectangle = r600_draw_rectangle;
+ r600_begin_new_cs(rctx);
r600_get_backend_mask(rctx); /* this emits commands and must be last */
if (rctx->chip_class == R600)
TGSI_INTERPOLATE_CONSTANT);
rctx->context.bind_fs_state(&rctx->context, rctx->dummy_pixel_shader);
+ no_blend.rt[0].colormask = 0xF;
+ rctx->no_blend = rctx->context.create_blend_state(&rctx->context, &no_blend);
+
return &rctx->context;
fail:
switch (rscreen->chip_class) {
case R600:
case EVERGREEN:
+ case CAYMAN:
rscreen->has_streamout = rscreen->info.drm_minor >= 14;
break;
case R700:
rscreen->has_streamout = rscreen->info.drm_minor >= 17;
break;
- /* TODO: Cayman */
- default:
- rscreen->has_streamout = debug_get_bool_option("R600_STREAMOUT", FALSE);
}
if (r600_init_tiling(rscreen)) {