diff options
author | Christian König <[email protected]> | 2011-04-16 16:02:40 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-04-16 16:02:40 +0200 |
commit | cfe921a9b659ae94248054c4f1330f863d214d5b (patch) | |
tree | 822d8d538c44a7d684f11a9c9472a45e1a324533 | |
parent | 5294ac62236bf05e1eaaca3399e539c28c0ccc4c (diff) |
[g3dvl] remove dummy sampler from mc
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c | 32 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h | 2 |
2 files changed, 0 insertions, 34 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c index 8102aed838e..afec37e28d9 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c @@ -453,9 +453,6 @@ bool vl_mc_init(struct vl_mpeg12_mc_renderer *renderer, struct pipe_context *pipe, unsigned buffer_width, unsigned buffer_height, float scale) { - struct pipe_resource tex_templ, *tex_dummy; - struct pipe_sampler_view sampler_view; - assert(renderer); assert(pipe); @@ -484,35 +481,8 @@ vl_mc_init(struct vl_mpeg12_mc_renderer *renderer, struct pipe_context *pipe, if (!renderer->fs_ycbcr) goto error_fs_ycbcr; - /* create a dummy sampler */ - memset(&tex_templ, 0, sizeof(tex_templ)); - tex_templ.bind = PIPE_BIND_SAMPLER_VIEW; - tex_templ.flags = 0; - - tex_templ.target = PIPE_TEXTURE_2D; - tex_templ.format = PIPE_FORMAT_R8_SNORM; - tex_templ.width0 = 1; - tex_templ.height0 = 1; - tex_templ.depth0 = 1; - tex_templ.array_size = 1; - tex_templ.last_level = 0; - tex_templ.usage = PIPE_USAGE_STATIC; - tex_dummy = pipe->screen->resource_create(pipe->screen, &tex_templ); - if (!tex_dummy) - goto error_dummy; - - memset(&sampler_view, 0, sizeof(sampler_view)); - u_sampler_view_default_template(&sampler_view, tex_dummy, tex_dummy->format); - renderer->dummy = pipe->create_sampler_view(pipe, tex_dummy, &sampler_view); - pipe_resource_reference(&tex_dummy, NULL); - if (!renderer->dummy) - goto error_dummy; - return true; -error_dummy: - renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr); - error_fs_ycbcr: renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ref); @@ -534,8 +504,6 @@ vl_mc_cleanup(struct vl_mpeg12_mc_renderer *renderer) { assert(renderer); - pipe_sampler_view_reference(&renderer->dummy, NULL); - cleanup_pipe_state(renderer); renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ref); diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h index f67f97a71fc..b5dd0139b02 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h +++ b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h @@ -47,8 +47,6 @@ struct vl_mpeg12_mc_renderer void *vs_ref, *vs_ycbcr; void *fs_ref, *fs_ycbcr; void *sampler_ref, *sampler_ycbcr; - - struct pipe_sampler_view *dummy; }; struct vl_mpeg12_mc_buffer |