X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_neon%2Fpsx_gpu%2Fvector_ops.h;h=189eb79d0d3cee92bd86f684c9e354f8d5ce49d4;hb=26e3e2aa7525fd4e63e64192dfbb68950e0e4c5a;hp=c11955d050ebcba733d8e57c1eebeac4ca69e24d;hpb=75e28f62b2a50044b58075d63d207409e0148409;p=pcsx_rearmed.git diff --git a/plugins/gpu_neon/psx_gpu/vector_ops.h b/plugins/gpu_neon/psx_gpu/vector_ops.h index c11955d0..189eb79d 100644 --- a/plugins/gpu_neon/psx_gpu/vector_ops.h +++ b/plugins/gpu_neon/psx_gpu/vector_ops.h @@ -15,33 +15,7 @@ #ifndef VECTOR_OPS #define VECTOR_OPS -#define build_vector_type_pair(sign, size, count, count_x2) \ -typedef struct \ -{ \ - sign##size e[count]; \ -} vec_##count##x##size##sign; \ - \ -typedef struct \ -{ \ - union \ - { \ - sign##size e[count_x2]; \ - struct \ - { \ - vec_##count##x##size##sign low; \ - vec_##count##x##size##sign high; \ - }; \ - }; \ -} vec_##count_x2##x##size##sign \ - -#define build_vector_types(sign) \ - build_vector_type_pair(sign, 8, 8, 16); \ - build_vector_type_pair(sign, 16, 4, 8); \ - build_vector_type_pair(sign, 32, 2, 4); \ - build_vector_type_pair(sign, 64, 1, 2) \ - -build_vector_types(u); -build_vector_types(s); +#include "vector_types.h" #define foreach_element(iterations, operation) \ @@ -394,6 +368,10 @@ build_vector_types(s); foreach_element(8, (dest).e[_i] = \ (u8)(source_a).e[_i] | ((u8)(source_b).e[_i] << 8)) \ +#define zip_4x32b(dest, source_a, source_b) \ + foreach_element(4, (dest).e[_i] = \ + (u16)(source_a).e[_i] | ((u16)(source_b).e[_i] << 16)) \ + #define zip_2x64b(dest, source_a, source_b) \ foreach_element(2, (dest).e[_i] = \ (u64)(source_a).e[_i] | ((u64)(source_b).e[_i] << 32)) \