Commit: 3c336bb41f4a4bf3ed3411b68bec5320d0cb5f43
Author: Lukas Tönne
Date: Wed Jul 13 15:00:20 2016 +0200
Branches: strand_gpu
https://developer.blender.org/rB3c336bb41f4a4bf3ed3411b68bec5320d0cb5f43
Fix for incorrect buffer size calculation.
The fiber vertex buffer was calculated more than 10x bigger than necessary ...
===================================================================
M source/blender/gpu/intern/gpu_buffers.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_buffers.c
b/source/blender/gpu/intern/gpu_buffers.c
index 6d9d0d2..5f52e55 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -2285,9 +2285,9 @@ static size_t
gpu_strands_buffer_size_from_type(GPUDrawStrands *gpu_buffer, GPUS
case GPU_STRAND_BUFFER_FIBER:
return sizeof(GPUFiber) * gpu_buffer->totfibers;
case GPU_STRAND_BUFFER_FIBER_VERTEX:
- return sizeof(GPUFiber) * gpu_buffer->fiber_totverts;
+ return sizeof(GPUFiberVertex) *
gpu_buffer->fiber_totverts;
case GPU_STRAND_BUFFER_FIBER_EDGE:
- return sizeof(GPUFiber) * gpu_buffer->fiber_totedges;
+ return sizeof(int) * 2 * gpu_buffer->fiber_totedges;
case GPU_STRAND_BUFFER_FIBER_POSITION:
return sizeof(float) * 3 * gpu_buffer->totfibers;
case GPU_STRAND_BUFFER_FIBER_NORMAL:
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs