notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
psx_gpu: increase reciprocal accuracy
[pcsx_rearmed.git]
/
plugins
/
gpu_neon
/
psx_gpu
/
psx_gpu.c
diff --git
a/plugins/gpu_neon/psx_gpu/psx_gpu.c
b/plugins/gpu_neon/psx_gpu/psx_gpu.c
index
68996c1
..
98aacc3
100644
(file)
--- a/
plugins/gpu_neon/psx_gpu/psx_gpu.c
+++ b/
plugins/gpu_neon/psx_gpu/psx_gpu.c
@@
-854,7
+854,7
@@
void compute_all_gradients(psx_gpu_struct *psx_gpu, vertex_struct *a,
\
dup_2x32b(edge_shifts, edge_shift); \
sub_2x32b(heights_b, heights, c_0x01); \
\
dup_2x32b(edge_shifts, edge_shift); \
sub_2x32b(heights_b, heights, c_0x01); \
- shr_2x32b(height_reciprocals, edge_shifts, 1
2
); \
+ shr_2x32b(height_reciprocals, edge_shifts, 1
0
); \
\
mla_2x32b(heights_b, x_starts, heights); \
bic_immediate_4x16b(vector_cast(vec_4x16u, edge_shifts), 0xE0); \
\
mla_2x32b(heights_b, x_starts, heights); \
bic_immediate_4x16b(vector_cast(vec_4x16u, edge_shifts), 0xE0); \
@@
-883,8
+883,8
@@
void compute_all_gradients(psx_gpu_struct *psx_gpu, vertex_struct *a,
sub_2x32b(widths, x_ends, x_starts); \
width_alt = x_c - start_c; \
\
sub_2x32b(widths, x_ends, x_starts); \
width_alt = x_c - start_c; \
\
- shr_2x32b(height_reciprocals, edge_shifts, 1
2
); \
- height_reciprocal_alt = edge_shift_alt >> 1
2
; \
+ shr_2x32b(height_reciprocals, edge_shifts, 1
0
); \
+ height_reciprocal_alt = edge_shift_alt >> 1
0
; \
\
bic_immediate_4x16b(vector_cast(vec_4x16u, edge_shifts), 0xE0); \
edge_shift_alt &= 0x1F; \
\
bic_immediate_4x16b(vector_cast(vec_4x16u, edge_shifts), 0xE0); \
edge_shift_alt &= 0x1F; \
@@
-4526,12
+4526,12
@@
void initialize_reciprocal_table(void)
{
shift = __builtin_clz(height);
height_normalized = height << shift;
{
shift = __builtin_clz(height);
height_normalized = height << shift;
- height_reciprocal = ((1ULL << 5
0
) + (height_normalized - 1)) /
+ height_reciprocal = ((1ULL << 5
2
) + (height_normalized - 1)) /
height_normalized;
height_normalized;
- shift = 32 - (5
0
- shift);
+ shift = 32 - (5
2
- shift);
- reciprocal_table[height] = (height_reciprocal << 1
2
) | shift;
+ reciprocal_table[height] = (height_reciprocal << 1
0
) | shift;
}
}
}
}