From 02870398a99fab6351182fba407d7d733affa5a1 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Fri, 17 Feb 2023 17:20:18 -0500 Subject: blend mode rendering halfway implemented --- src/memory.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/memory.cpp') 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++; -- cgit v1.2.3