diff options
author | Francisco Jerez <[email protected]> | 2016-01-22 15:57:02 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-22 16:43:18 -0800 |
commit | 11d5c1905ce3856a3832718bbcb0c65928a3b26b (patch) | |
tree | 4f84217863e70600da9e79dfe53c206af49df39e | |
parent | bf151b8892ca6c82bac591202f7d519afabf5d9d (diff) |
anv/meta: Set sampler type and instruction arrayness consistently in blit shader.
-rw-r--r-- | src/vulkan/anv_meta.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index e273dd7608d..083ee371f60 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -92,7 +92,8 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim) (tex_dim == GLSL_SAMPLER_DIM_1D ? 2 : 3), false); const struct glsl_type *sampler_type = - glsl_sampler_type(tex_dim, false, false, glsl_get_base_type(color_type)); + glsl_sampler_type(tex_dim, false, tex_dim != GLSL_SAMPLER_DIM_3D, + glsl_get_base_type(color_type)); nir_variable *sampler = nir_variable_create(b.shader, nir_var_uniform, sampler_type, "s_tex"); sampler->data.descriptor_set = 0; @@ -104,10 +105,7 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim) tex->src[0].src_type = nir_tex_src_coord; tex->src[0].src = nir_src_for_ssa(tex_pos); tex->dest_type = nir_type_float; /* TODO */ - - if (tex_dim != GLSL_SAMPLER_DIM_3D) - tex->is_array = true; - + tex->is_array = glsl_sampler_type_is_array(sampler_type); tex->coord_components = tex_pos->num_components; tex->sampler = nir_deref_var_create(tex, sampler); |