[g3dvl] remove dummy sampler from mc
authorChristian König <deathsimple@vodafone.de>
Sat, 16 Apr 2011 14:02:40 +0000 (16:02 +0200)
committerChristian König <deathsimple@vodafone.de>
Sat, 16 Apr 2011 14:02:40 +0000 (16:02 +0200)
src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.h

index 8102aed838ec4651d71e826ba40501140a37dcfe..afec37e28d9e2f15dfa586f24b8fe8f4e95bbeca 100644 (file)
@@ -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);
index f67f97a71fc22a1228dbabe0e99c4c9a06f55a12..b5dd0139b0239b3997a0d936a02e72c38f7842b4 100644 (file)
@@ -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