#define gvhaddq_u16(d, a, b) d.u16 = vhaddq_u16(a.u16, b.u16)
#define gvmax_s16(d, a, b) d.s16 = vmax_s16(a.s16, b.s16)
#define gvmin_s16(d, a, b) d.s16 = vmin_s16(a.s16, b.s16)
#define gvhaddq_u16(d, a, b) d.u16 = vhaddq_u16(a.u16, b.u16)
#define gvmax_s16(d, a, b) d.s16 = vmax_s16(a.s16, b.s16)
#define gvmin_s16(d, a, b) d.s16 = vmin_s16(a.s16, b.s16)
#define gvminq_u8(d, a, b) d.u8 = vminq_u8(a.u8, b.u8)
#define gvminq_u16(d, a, b) d.u16 = vminq_u16(a.u16, b.u16)
#define gvmla_s32(d, a, b) d.s32 = vmla_s32(d.s32, a.s32, b.s32)
#define gvminq_u8(d, a, b) d.u8 = vminq_u8(a.u8, b.u8)
#define gvminq_u16(d, a, b) d.u16 = vminq_u16(a.u16, b.u16)
#define gvmla_s32(d, a, b) d.s32 = vmla_s32(d.s32, a.s32, b.s32)
-#define gvminq_u16(d, a, b) d.m = _mm_min_epu16(a.m, b.m)
+#define gvmin_u16(d, a, b) d.m = _mm_min_epu16(a.m, b.m)
+#define gvminq_u16 gvmin_u16
#define gvmovl_u8(d, s) d.m = _mm_cvtepu8_epi16(s.m)
#define gvmovl_s8(d, s) d.m = _mm_cvtepi8_epi16(s.m)
#define gvmovl_s32(d, s) d.m = _mm_cvtepi32_epi64(s.m)
#define gvmovl_u8(d, s) d.m = _mm_cvtepu8_epi16(s.m)
#define gvmovl_s8(d, s) d.m = _mm_cvtepi8_epi16(s.m)
#define gvmovl_s32(d, s) d.m = _mm_cvtepi32_epi64(s.m)
// can do this because the caller needs the msb clear
#define gvhaddq_u16(d, a, b) d.u16 = (a.u16 + b.u16) >> 1
#endif
// can do this because the caller needs the msb clear
#define gvhaddq_u16(d, a, b) d.u16 = (a.u16 + b.u16) >> 1
#endif
\
gvdupq_n_u16(c_0x0001, 0x0001); \
gvdupq_n_u16(left_edge, psx_gpu->viewport_start_x); \
\
gvdupq_n_u16(c_0x0001, 0x0001); \
gvdupq_n_u16(left_edge, psx_gpu->viewport_start_x); \
gvdup_n_u16(c_0x04, 0x04); \
gvdup_n_u16(c_0x07, 0x07); \
gvdup_n_u16(c_0xFFFE, 0xFFFE); \
gvdup_n_u16(c_0x04, 0x04); \
gvdup_n_u16(c_0x07, 0x07); \
gvdup_n_u16(c_0xFFFE, 0xFFFE); \
#if defined(__ARM_NEON) || defined(__ARM_NEON__)
// better encoding, remaining bits are unused anyway
#if defined(__ARM_NEON) || defined(__ARM_NEON__)
// better encoding, remaining bits are unused anyway
gvand(span_shift, left_right_x_16_hi, c_0x07); \
setup_spans_make_span_shift(span_shift); \
gvshr_n_u16(left_right_x_16_hi, left_right_x_16_hi, 3); \
gvand(span_shift, left_right_x_16_hi, c_0x07); \
setup_spans_make_span_shift(span_shift); \
gvshr_n_u16(left_right_x_16_hi, left_right_x_16_hi, 3); \
\
gvst4_pi_u16(left_right_x_16_lo, left_right_x_16_hi, span_shift, y_x4, \
span_edge_data); \
\
gvst4_pi_u16(left_right_x_16_lo, left_right_x_16_hi, span_shift, y_x4, \
span_edge_data); \
{ \
u64 y_x4_ = ((u64)(y_a + 3) << 48) | ((u64)(u16)(y_a + 2) << 32) \
| (u32)((y_a + 1) << 16) | (u16)y_a; \
{ \
u64 y_x4_ = ((u64)(y_a + 3) << 48) | ((u64)(u16)(y_a + 2) << 32) \
| (u32)((y_a + 1) << 16) | (u16)y_a; \
{ \
u64 y_x4_ = ((u64)(y_a - 3) << 48) | ((u64)(u16)(y_a - 2) << 32) \
| (u32)((y_a - 1) << 16) | (u16)y_a; \
{ \
u64 y_x4_ = ((u64)(y_a - 3) << 48) | ((u64)(u16)(y_a - 2) << 32) \
| (u32)((y_a - 1) << 16) | (u16)y_a; \
{
u64 y_x4_ = ((u64)(y_a - 3) << 48) | ((u64)(u16)(y_a - 2) << 32)
| (u32)((y_a - 1) << 16) | (u16)y_a;
{
u64 y_x4_ = ((u64)(y_a - 3) << 48) | ((u64)(u16)(y_a - 2) << 32)
| (u32)((y_a - 1) << 16) | (u16)y_a;
{
u64 y_x4_ = ((u64)(y_a + 3) << 48) | ((u64)(u16)(y_a + 2) << 32)
| (u32)((y_a + 1) << 16) | (u16)y_a;
{
u64 y_x4_ = ((u64)(y_a + 3) << 48) | ((u64)(u16)(y_a + 2) << 32)
| (u32)((y_a + 1) << 16) | (u16)y_a;
gvmull_u8(pixels_##component, texels_##component, colors_##component) \
#define shade_blocks_textured_modulated_do(shading, dithering, target) \
gvmull_u8(pixels_##component, texels_##component, colors_##component) \
#define shade_blocks_textured_modulated_do(shading, dithering, target) \
-void setup_sprite_untextured(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u,
+void setup_sprite_untextured_512(psx_gpu_struct *psx_gpu, s32 x, s32 y, s32 u,
s32 v, s32 width, s32 height, u32 color)
{
s32 v, s32 width, s32 height, u32 color)
{
- if((psx_gpu->render_state & (RENDER_STATE_MASK_EVALUATE |
- RENDER_FLAGS_MODULATE_TEXELS | RENDER_FLAGS_BLEND)) == 0 &&
- (psx_gpu->render_mode & RENDER_INTERLACE_ENABLED) == 0)
- {
- setup_sprite_untextured_simple(psx_gpu, x, y, u, v, width, height, color);
- return;
- }
-
- setup_sprite_untextured_(psx_gpu, x, y, u, v, width, height, color);
+ setup_sprite_untextured_512_(psx_gpu, x, y, u, v, width, height, color);