radv: remove one useless image type in the fmask expand shader
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 20 May 2019 08:28:01 +0000 (10:28 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Jun 2019 18:50:53 +0000 (20:50 +0200)
Both input and output images use the same type.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_fmask_expand.c

index f4b553289294dacc9b6adf2b11ab4bf2d602a6c6..12533935348727da67012020edf64e0c88a709f1 100644 (file)
@@ -30,10 +30,7 @@ build_fmask_expand_compute_shader(struct radv_device *device, int samples)
 {
        nir_builder b;
        char name[64];
-       const struct glsl_type *input_img_type =
-               glsl_sampler_type(GLSL_SAMPLER_DIM_MS, false, false,
-                                 GLSL_TYPE_FLOAT);
-       const struct glsl_type *output_img_type =
+       const struct glsl_type *img_type =
                glsl_sampler_type(GLSL_SAMPLER_DIM_MS, false, false,
                                  GLSL_TYPE_FLOAT);
 
@@ -46,12 +43,12 @@ build_fmask_expand_compute_shader(struct radv_device *device, int samples)
        b.shader->info.cs.local_size[2] = 1;
 
        nir_variable *input_img = nir_variable_create(b.shader, nir_var_uniform,
-                                                     input_img_type, "s_tex");
+                                                     img_type, "s_tex");
        input_img->data.descriptor_set = 0;
        input_img->data.binding = 0;
 
        nir_variable *output_img = nir_variable_create(b.shader, nir_var_uniform,
-                                                      output_img_type, "out_img");
+                                                      img_type, "out_img");
        output_img->data.descriptor_set = 0;
        output_img->data.binding = 1;