diff options
author | Fox Caminiti <fox@foxcam.net> | 2023-02-17 17:20:18 -0500 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2023-02-17 17:20:18 -0500 |
commit | 02870398a99fab6351182fba407d7d733affa5a1 (patch) | |
tree | fb5f4744f46e9d7816072e4d01547034bca04bb2 /src/memory.cpp | |
parent | fffb3474ee0321d73a47db01dbc4b6b19670ddc5 (diff) |
blend mode rendering halfway implemented
Diffstat (limited to 'src/memory.cpp')
-rw-r--r-- | src/memory.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/memory.cpp b/src/memory.cpp index 7454a2a..fc82a13 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -95,7 +95,7 @@ Block_Loop(memory *Memory, property_channel *Property, uint32 TotalCount, int *H *HasIncremented = 0; (*Index)++; } - uint8 *Occupied = (uint8 *)Bezier_LookupAddress(Memory, Property, *Index, 0); + uint8 *Occupied = (uint8 *)Bezier_LookupAddress(Memory, Property->Block_Bezier_Index, *Index, 0); if (*Occupied) { *HasIncremented = 1; (*CurrentCount)++; @@ -291,7 +291,16 @@ void Memory_Fill(uint8 *Address_Write, uint8 *Address_Read, uint64 WriteSize, ui void Arbitrary_Zero(uint8 *Address_Write, uint64 Size) { + __m256i Zero256 = _mm256_setzero_si256(); uint64 i = 0; + if (Size > 64 && InstructionMode == instruction_mode_avx) { + uint64 Size_Lane = Size - (Size % 64); + while (i < Size_Lane) { + _mm256_storeu_si256((__m256i *)(Address_Write + i), Zero256); + _mm256_storeu_si256((__m256i *)(Address_Write + i + 32), Zero256); + i += 64; + } + } while (i < Size) { *(Address_Write + i) = 0; i++; |