mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 21:58:27 +00:00
m1n1.agx.context: BufferManager fixes, add explicit counter management
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
c94c020197
commit
8647e1102c
1 changed files with 5 additions and 4 deletions
|
@ -180,7 +180,7 @@ class GPUBufferManager:
|
|||
self.block_ctl = self.block_ctl_obj.push().regmap()
|
||||
|
||||
self.counter_obj = agx.kshared.new(BufferManagerCounter)
|
||||
self.counter_obj.count = 1
|
||||
self.counter_obj.count = 0
|
||||
self.counter = self.counter_obj.push().regmap()
|
||||
|
||||
self.misc_obj = agx.kshared.new(BufferManagerMisc)
|
||||
|
@ -206,9 +206,6 @@ class GPUBufferManager:
|
|||
info.block_size = self.block_size
|
||||
|
||||
info.counter = self.counter_obj
|
||||
info.misc = self.misc_obj
|
||||
|
||||
info.unkptr_d8 = context.uobj.buf(0x80, "BufferManager unk")
|
||||
|
||||
self.populate()
|
||||
self.block_ctl_obj.pull()
|
||||
|
@ -217,6 +214,10 @@ class GPUBufferManager:
|
|||
|
||||
info.push()
|
||||
|
||||
def increment(self):
|
||||
self.counter_obj.count += 1
|
||||
self.counter_obj.push()
|
||||
|
||||
def populate(self):
|
||||
idx = self.block_ctl.wptr.val
|
||||
total = self.block_ctl.total.val
|
||||
|
|
Loading…
Add table
Reference in a new issue