radv/meta: Use sized types for nir_tex_instr::dest_type

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>
This commit is contained in:
Connor Abbott 2020-12-08 13:34:44 +01:00
parent 68969cbcb7
commit 219b84fd5f
9 changed files with 18 additions and 18 deletions

View file

@ -598,7 +598,7 @@ void radv_meta_build_resolve_shader_core(nir_builder *b,
tex->src[1].src = nir_src_for_ssa(nir_imm_int(b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = 2;
@ -615,7 +615,7 @@ void radv_meta_build_resolve_shader_core(nir_builder *b,
tex_all_same->src[0].src = nir_src_for_ssa(img_coord);
tex_all_same->src[1].src_type = nir_tex_src_texture_deref;
tex_all_same->src[1].src = nir_src_for_ssa(input_img_deref);
tex_all_same->dest_type = nir_type_uint;
tex_all_same->dest_type = nir_type_bool1;
tex_all_same->is_array = false;
tex_all_same->coord_components = 2;
@ -634,7 +634,7 @@ void radv_meta_build_resolve_shader_core(nir_builder *b,
tex_add->src[1].src = nir_src_for_ssa(nir_imm_int(b, i));
tex_add->src[2].src_type = nir_tex_src_texture_deref;
tex_add->src[2].src = nir_src_for_ssa(input_img_deref);
tex_add->dest_type = nir_type_float;
tex_add->dest_type = nir_type_float32;
tex_add->is_array = false;
tex_add->coord_components = 2;

View file

@ -123,7 +123,7 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim)
tex->src[1].src = nir_src_for_ssa(tex_deref);
tex->src[2].src_type = nir_tex_src_sampler_deref;
tex->src[2].src = nir_src_for_ssa(tex_deref);
tex->dest_type = nir_type_float; /* TODO */
tex->dest_type = nir_type_float32; /* TODO */
tex->is_array = glsl_sampler_type_is_array(sampler_type);
tex->coord_components = tex_pos->num_components;
@ -175,7 +175,7 @@ build_nir_copy_fragment_shader_depth(enum glsl_sampler_dim tex_dim)
tex->src[1].src = nir_src_for_ssa(tex_deref);
tex->src[2].src_type = nir_tex_src_sampler_deref;
tex->src[2].src = nir_src_for_ssa(tex_deref);
tex->dest_type = nir_type_float; /* TODO */
tex->dest_type = nir_type_float32; /* TODO */
tex->is_array = glsl_sampler_type_is_array(sampler_type);
tex->coord_components = tex_pos->num_components;
@ -227,7 +227,7 @@ build_nir_copy_fragment_shader_stencil(enum glsl_sampler_dim tex_dim)
tex->src[1].src = nir_src_for_ssa(tex_deref);
tex->src[2].src_type = nir_tex_src_sampler_deref;
tex->src[2].src = nir_src_for_ssa(tex_deref);
tex->dest_type = nir_type_float; /* TODO */
tex->dest_type = nir_type_float32; /* TODO */
tex->is_array = glsl_sampler_type_is_array(sampler_type);
tex->coord_components = tex_pos->num_components;

View file

@ -518,7 +518,7 @@ build_nir_texel_fetch(struct nir_builder *b, struct radv_device *device,
tex->src[3].src_type = nir_tex_src_lod;
tex->src[3].src = nir_src_for_ssa(nir_imm_int(b, 0));
}
tex->dest_type = nir_type_uint;
tex->dest_type = nir_type_uint32;
tex->is_array = false;
tex->coord_components = is_3d ? 3 : 2;
@ -556,7 +556,7 @@ build_nir_buffer_fetch(struct nir_builder *b, struct radv_device *device,
tex->src[0].src = nir_src_for_ssa(pos_x);
tex->src[1].src_type = nir_tex_src_texture_deref;
tex->src[1].src = nir_src_for_ssa(tex_deref);
tex->dest_type = nir_type_uint;
tex->dest_type = nir_type_uint32;
tex->is_array = false;
tex->coord_components = 1;

View file

@ -81,7 +81,7 @@ build_nir_itob_compute_shader(struct radv_device *dev, bool is_3d)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = is_3d ? 3 : 2;
@ -295,7 +295,7 @@ build_nir_btoi_compute_shader(struct radv_device *dev, bool is_3d)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = 1;
@ -503,7 +503,7 @@ build_nir_btoi_r32g32b32_compute_shader(struct radv_device *dev)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = 1;
nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, "tex");
@ -671,7 +671,7 @@ build_nir_itoi_compute_shader(struct radv_device *dev, bool is_3d)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = is_3d ? 3 : 2;
@ -889,7 +889,7 @@ build_nir_itoi_r32g32b32_compute_shader(struct radv_device *dev)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = 1;
nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, "tex");

View file

@ -75,7 +75,7 @@ build_dcc_decompress_compute_shader(struct radv_device *dev)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, 0));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = false;
tex->coord_components = 2;

View file

@ -82,7 +82,7 @@ build_fmask_expand_compute_shader(struct radv_device *device, int samples)
tex->src[1].src = nir_src_for_ssa(nir_imm_int(&b, i));
tex->src[2].src_type = nir_tex_src_texture_deref;
tex->src[2].src = nir_src_for_ssa(input_img_deref);
tex->dest_type = nir_type_float;
tex->dest_type = nir_type_float32;
tex->is_array = true;
tex->coord_components = 3;

View file

@ -187,7 +187,7 @@ build_depth_stencil_resolve_compute_shader(struct radv_device *dev, int samples,
nir_ssa_def *input_img_deref = &nir_build_deref_var(&b, input_img)->dest.ssa;
nir_alu_type type = index == DEPTH_RESOLVE ? nir_type_float : nir_type_uint;
nir_alu_type type = index == DEPTH_RESOLVE ? nir_type_float32 : nir_type_uint32;
nir_tex_instr *tex = nir_tex_instr_create(b.shader, 3);
tex->sampler_dim = GLSL_SAMPLER_DIM_MS;

View file

@ -376,7 +376,7 @@ build_depth_stencil_resolve_fragment_shader(struct radv_device *dev, int samples
nir_ssa_def *input_img_deref = &nir_build_deref_var(&b, input_img)->dest.ssa;
nir_alu_type type = index == DEPTH_RESOLVE ? nir_type_float : nir_type_uint;
nir_alu_type type = index == DEPTH_RESOLVE ? nir_type_float32 : nir_type_uint32;
nir_tex_instr *tex = nir_tex_instr_create(b.shader, 3);
tex->sampler_dim = GLSL_SAMPLER_DIM_MS;

View file

@ -47,7 +47,7 @@ get_texture_size(struct ycbcr_state *state, nir_deref_instr *texture)
tex->sampler_dim = glsl_get_sampler_dim(type);
tex->is_array = glsl_sampler_type_is_array(type);
tex->is_shadow = glsl_sampler_type_is_shadow(type);
tex->dest_type = nir_type_int;
tex->dest_type = nir_type_int32;
tex->src[0].src_type = nir_tex_src_texture_deref;
tex->src[0].src = nir_src_for_ssa(&texture->dest.ssa);