diff options
author | Jason Ekstrand <[email protected]> | 2016-03-28 15:25:47 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-08 15:57:28 -0700 |
commit | b38a0d64ba2274c3d48b731e86a7bbb04fca81c8 (patch) | |
tree | 5a846198e328b12134bd8bd49e8cc78ca217a0c2 /src | |
parent | dd6f7200466b06e13f7c9cd70710bc2c57433706 (diff) |
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_meta_blit2d.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |