X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr300%2Fr300_context.c;h=e28dbfb4034182eb0b77eab99891190760bca8ff;hb=5f7faff61bc3ebe80f262fac6f58225d8005631b;hp=0ac41471650de5694c5d21c66d1c44297fbc5f35;hpb=3f584c211a0587c4cf5e6d36275390cd7181b5c8;p=mesa.git diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 0ac41471650..e28dbfb4034 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -75,6 +75,9 @@ static void r300_destroy_context(struct pipe_context* context) if (r300->cs && r300->hyperz_enabled) { r300->rws->cs_request_feature(r300->cs, RADEON_FID_R300_HYPERZ_ACCESS, FALSE); } + if (r300->cs && r300->cmask_access) { + r300->rws->cs_request_feature(r300->cs, RADEON_FID_R300_CMASK_ACCESS, FALSE); + } if (r300->blitter) util_blitter_destroy(r300->blitter); @@ -201,8 +204,9 @@ static boolean r300_setup_atoms(struct r300_context* r300) R300_INIT_ATOM(texture_cache_inval, 2); R300_INIT_ATOM(textures_state, 0); /* Clear commands */ - R300_INIT_ATOM(hiz_clear, r300->screen->caps.hiz_ram > 0 ? 6 : 0); - R300_INIT_ATOM(zmask_clear, r300->screen->caps.zmask_ram > 0 ? 6 : 0); + R300_INIT_ATOM(hiz_clear, r300->screen->caps.hiz_ram > 0 ? 4 : 0); + R300_INIT_ATOM(zmask_clear, r300->screen->caps.zmask_ram > 0 ? 4 : 0); + R300_INIT_ATOM(cmask_clear, 4); /* ZB (unpipelined), SU. */ R300_INIT_ATOM(query_start, 4); @@ -271,7 +275,7 @@ static void r300_init_states(struct pipe_context *pipe) pipe->set_blend_color(pipe, &bc); pipe->set_clip_state(pipe, &cs); - pipe->set_scissor_state(pipe, &ss); + pipe->set_scissor_states(pipe, 0, 1, &ss); pipe->set_sample_mask(pipe, ~0); /* Initialize the GPU flush. */ @@ -375,7 +379,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, sizeof(struct pipe_transfer), 64, UTIL_SLAB_SINGLETHREADED); - r300->cs = rws->cs_create(rws); + r300->cs = rws->cs_create(rws, RING_GFX, NULL); if (r300->cs == NULL) goto fail; @@ -405,13 +409,11 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300_init_render_functions(r300); r300_init_states(&r300->context); - r300->context.create_video_decoder = vl_create_decoder; + r300->context.create_video_codec = vl_create_decoder; r300->context.create_video_buffer = vl_video_buffer_create; - if (r300screen->caps.has_tcl) { - r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4, - PIPE_BIND_INDEX_BUFFER); - } + r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4, + PIPE_BIND_CUSTOM); r300->blitter = util_blitter_create(&r300->context); if (r300->blitter == NULL) @@ -449,12 +451,13 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, memset(&vb, 0, sizeof(vb)); vb.target = PIPE_BUFFER; vb.format = PIPE_FORMAT_R8_UNORM; - vb.usage = PIPE_USAGE_STATIC; + vb.usage = PIPE_USAGE_DEFAULT; vb.width0 = sizeof(float) * 16; vb.height0 = 1; vb.depth0 = 1; r300->dummy_vb.buffer = screen->resource_create(screen, &vb); + r300->context.set_vertex_buffers(&r300->context, 0, 1, &r300->dummy_vb); } {