From: Jason Ekstrand Date: Mon, 28 Mar 2016 22:25:47 +0000 (-0700) Subject: anv/meta2d: Don't declare an array sampler in the fragment shader X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b38a0d64ba2274c3d48b731e86a7bbb04fca81c8;p=mesa.git anv/meta2d: Don't declare an array sampler in the fragment shader With the new blit framework we aren't using array textures and, from talking with Nanley, we don't think it's going to be useful in the future either. Just get rid of it for now. Reviewed-by: Nanley Chery --- diff --git a/src/intel/vulkan/anv_meta_blit2d.c b/src/intel/vulkan/anv_meta_blit2d.c index f40dc2f7828..10e9ba3befd 100644 --- a/src/intel/vulkan/anv_meta_blit2d.c +++ b/src/intel/vulkan/anv_meta_blit2d.c @@ -393,19 +393,19 @@ static nir_shader * build_nir_copy_fragment_shader() { const struct glsl_type *vec4 = glsl_vec4_type(); - const struct glsl_type *vec3 = glsl_vector_type(GLSL_TYPE_FLOAT, 3); + const struct glsl_type *vec2 = glsl_vector_type(GLSL_TYPE_FLOAT, 2); nir_builder b; nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT, NULL); b.shader->info.name = ralloc_strdup(b.shader, "meta_blit2d_fs"); nir_variable *tex_pos_in = nir_variable_create(b.shader, nir_var_shader_in, - vec3, "v_tex_pos"); + vec2, "v_tex_pos"); tex_pos_in->data.location = VARYING_SLOT_VAR0; nir_ssa_def *const tex_pos = nir_f2i(&b, nir_load_var(&b, tex_pos_in)); const struct glsl_type *sampler_type = - glsl_sampler_type(GLSL_SAMPLER_DIM_2D, false, true, + glsl_sampler_type(GLSL_SAMPLER_DIM_2D, false, false, glsl_get_base_type(vec4)); nir_variable *sampler = nir_variable_create(b.shader, nir_var_uniform, sampler_type, "s_tex"); @@ -420,7 +420,7 @@ build_nir_copy_fragment_shader() tex->src[1].src_type = nir_tex_src_lod; tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0)); tex->dest_type = nir_type_float; /* TODO */ - tex->is_array = glsl_sampler_type_is_array(sampler_type); + tex->is_array = false; tex->coord_components = tex_pos->num_components; tex->texture = nir_deref_var_create(tex, sampler); tex->sampler = NULL;