Skip to content

Commit

Permalink
Fix FIFOBufferAllocator.hx wrong pooling depending on buffer flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
clementlandrin committed Dec 10, 2024
1 parent 93ad49d commit 9fc3b84
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hxd/impl/FIFOBufferAllocator.hx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ class FIFOBufferAllocator extends Allocator {

override function disposeBuffer(b:h3d.Buffer) {
if( b.isDisposed() ) return;
var f = b.flags;
var flags = f.has(UniformBuffer) ? UniformDynamic : (f.has(Dynamic) ? Dynamic : Static);
var id = flags.toInt() | (b.format.uid << 3) | (b.vertices << 16);
var id = fromBufferFlags(b.flags).toInt() | (b.format.uid << 3) | (b.vertices << 16);
var c = buffers.get(id);
if( c == null ) {
c = new Cache(this, maxKeepFrame, function(b:h3d.Buffer) b.dispose());
Expand Down

0 comments on commit 9fc3b84

Please sign in to comment.