st/mesa: don't call u_sampler_view_default_template for sampler views
authorMarek Olšák <marek.olsak@amd.com>
Sun, 11 Jun 2017 23:27:26 +0000 (01:27 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Jun 2017 23:51:02 +0000 (01:51 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_sampler_view.c

index 8c814ed..7a8d05d 100644 (file)
@@ -373,10 +373,11 @@ st_create_texture_sampler_view_from_stobj(struct st_context *st,
                                          enum pipe_format format,
                                           bool glsl130_or_later)
 {
+   /* There is no need to clear this structure (consider CPU overhead). */
    struct pipe_sampler_view templ;
    unsigned swizzle = get_texture_format_swizzle(st, stObj, glsl130_or_later);
 
-   u_sampler_view_default_template(&templ, stObj->pt, format);
+   templ.format = format;
 
    templ.u.tex.first_level = stObj->base.MinLevel + stObj->base.BaseLevel;
    templ.u.tex.last_level = last_level(stObj);