X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_pipe_sampler.c;h=8a87bb467aa45e042d1fb6aea0e9da132aa88cff;hb=615a356ee38d882e9f073dba0b8918a903094124;hp=b64e8138efbec711651593342c1d2eaa549aa8c8;hpb=88b17a15f3ce50d4c373908c16b08881916cdabd;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index b64e8138efb..8a87bb467aa 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -165,17 +165,10 @@ svga_bind_sampler_states(struct pipe_context *pipe, if (shader != PIPE_SHADER_FRAGMENT) return; - /* Check for no-op */ - if (start + num <= svga->curr.num_samplers && - !memcmp(svga->curr.sampler + start, samplers, num * sizeof(void *))) { - if (0) debug_printf("sampler noop\n"); - return; - } - for (i = 0; i < num; i++) svga->curr.sampler[start + i] = samplers[i]; - /* find highest non-null sampler_views[] entry */ + /* find highest non-null sampler[] entry */ { unsigned j = MAX2(svga->curr.num_samplers, start + num); while (j > 0 && svga->curr.sampler[j - 1] == NULL) @@ -240,14 +233,6 @@ svga_set_sampler_views(struct pipe_context *pipe, if (shader != PIPE_SHADER_FRAGMENT) return; - /* Check for no-op */ - if (start + num <= svga->curr.num_sampler_views && - !memcmp(svga->curr.sampler_views + start, views, - num * sizeof(struct pipe_sampler_view *))) { - if (0) debug_printf("texture noop\n"); - return; - } - for (i = 0; i < num; i++) { if (svga->curr.sampler_views[start + i] != views[i]) { /* Note: we're using pipe_sampler_view_release() here to work around @@ -289,21 +274,12 @@ svga_set_sampler_views(struct pipe_context *pipe, } -static void -svga_set_fragment_sampler_views(struct pipe_context *pipe, - unsigned num, - struct pipe_sampler_view **views) -{ - svga_set_sampler_views(pipe, PIPE_SHADER_FRAGMENT, 0, num, views); -} - - void svga_init_sampler_functions( struct svga_context *svga ) { svga->pipe.create_sampler_state = svga_create_sampler_state; svga->pipe.bind_sampler_states = svga_bind_sampler_states; svga->pipe.delete_sampler_state = svga_delete_sampler_state; - svga->pipe.set_fragment_sampler_views = svga_set_fragment_sampler_views; + svga->pipe.set_sampler_views = svga_set_sampler_views; svga->pipe.create_sampler_view = svga_create_sampler_view; svga->pipe.sampler_view_destroy = svga_sampler_view_destroy; }