diff options
author | Dave Airlie <[email protected]> | 2017-03-09 08:26:13 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-03-09 09:17:11 +1000 |
commit | e6902be90079500cb421f7eb886cdcc49bb58a60 (patch) | |
tree | 8abd5c449235833188cc75dc49c415c742ec1bf8 /src/amd/vulkan/radv_meta_bufimage.c | |
parent | 0e34966340c76225223e534536526e846b0654fb (diff) |
radv/ac: fixup texture coord to have right number of channels.
Jason has patches to add validation to this area, this should fix
radv shaders.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_bufimage.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_bufimage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_meta_bufimage.c b/src/amd/vulkan/radv_meta_bufimage.c index 9f67a686e36..4cdd0703547 100644 --- a/src/amd/vulkan/radv_meta_bufimage.c +++ b/src/amd/vulkan/radv_meta_bufimage.c @@ -85,7 +85,7 @@ build_nir_itob_compute_shader(struct radv_device *dev) tex->sampler_dim = GLSL_SAMPLER_DIM_2D; tex->op = nir_texop_txf; tex->src[0].src_type = nir_tex_src_coord; - tex->src[0].src = nir_src_for_ssa(img_coord); + tex->src[0].src = nir_src_for_ssa(nir_channels(&b, img_coord, 0x3)); 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; @@ -288,7 +288,7 @@ build_nir_btoi_compute_shader(struct radv_device *dev) tex->sampler_dim = GLSL_SAMPLER_DIM_BUF; tex->op = nir_texop_txf; tex->src[0].src_type = nir_tex_src_coord; - tex->src[0].src = nir_src_for_ssa(buf_coord); + tex->src[0].src = nir_src_for_ssa(nir_channels(&b, buf_coord, 1)); 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; @@ -477,7 +477,7 @@ build_nir_itoi_compute_shader(struct radv_device *dev) tex->sampler_dim = GLSL_SAMPLER_DIM_2D; tex->op = nir_texop_txf; tex->src[0].src_type = nir_tex_src_coord; - tex->src[0].src = nir_src_for_ssa(src_coord); + tex->src[0].src = nir_src_for_ssa(nir_channels(&b, src_coord, 3)); 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; |