Re: [Mesa-dev] [PATCH] radv: fix btoi for R32G32B32 when the dest offset is not 0

2018-10-23 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen 
On Mon, Oct 22, 2018 at 3:41 PM Samuel Pitoiset
 wrote:
>
> Fixes: 593996bc02 ("radv: implement buffer to image operations for R32G32B32")
> Signed-off-by: Samuel Pitoiset 
> ---
>  src/amd/vulkan/radv_meta_bufimage.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_meta_bufimage.c 
> b/src/amd/vulkan/radv_meta_bufimage.c
> index 73a5034222..ec449c5bca 100644
> --- a/src/amd/vulkan/radv_meta_bufimage.c
> +++ b/src/amd/vulkan/radv_meta_bufimage.c
> @@ -556,8 +556,8 @@ build_nir_btoi_r32g32b32_compute_shader(struct 
> radv_device *dev)
>
> nir_ssa_def *global_pos =
> nir_iadd(&b,
> -nir_imul(&b, pos_y, &pitch->dest.ssa),
> -nir_imul(&b, pos_x, nir_imm_int(&b, 3)));
> +nir_imul(&b, nir_channel(&b, img_coord, 1), 
> &pitch->dest.ssa),
> +nir_imul(&b, nir_channel(&b, img_coord, 0), 
> nir_imm_int(&b, 3)));
>
> nir_ssa_def *input_img_deref = &nir_build_deref_var(&b, 
> input_img)->dest.ssa;
>
> --
> 2.19.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] radv: fix btoi for R32G32B32 when the dest offset is not 0

2018-10-22 Thread Samuel Pitoiset
Fixes: 593996bc02 ("radv: implement buffer to image operations for R32G32B32")
Signed-off-by: Samuel Pitoiset 
---
 src/amd/vulkan/radv_meta_bufimage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_meta_bufimage.c 
b/src/amd/vulkan/radv_meta_bufimage.c
index 73a5034222..ec449c5bca 100644
--- a/src/amd/vulkan/radv_meta_bufimage.c
+++ b/src/amd/vulkan/radv_meta_bufimage.c
@@ -556,8 +556,8 @@ build_nir_btoi_r32g32b32_compute_shader(struct radv_device 
*dev)
 
nir_ssa_def *global_pos =
nir_iadd(&b,
-nir_imul(&b, pos_y, &pitch->dest.ssa),
-nir_imul(&b, pos_x, nir_imm_int(&b, 3)));
+nir_imul(&b, nir_channel(&b, img_coord, 1), 
&pitch->dest.ssa),
+nir_imul(&b, nir_channel(&b, img_coord, 0), 
nir_imm_int(&b, 3)));
 
nir_ssa_def *input_img_deref = &nir_build_deref_var(&b, 
input_img)->dest.ssa;
 
-- 
2.19.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev