mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
m1n1.fw.agx: Fix some more sequence number-ish field names
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
b7fb8d98d8
commit
074892377c
3 changed files with 20 additions and 15 deletions
|
@ -205,7 +205,7 @@ class GPURenderer:
|
|||
self.event_control.event_count.val = 0
|
||||
self.event_control.event_count.push()
|
||||
|
||||
self.event_control.generation = 0
|
||||
self.event_control.submission_id = 0
|
||||
self.event_control.cur_count = 0
|
||||
self.event_control.unk_10 = 0x50
|
||||
self.event_control.push()
|
||||
|
@ -217,6 +217,8 @@ class GPURenderer:
|
|||
|
||||
self.work = []
|
||||
|
||||
self.ev_idx = 0
|
||||
|
||||
def submit(self, cmdbuf, wait_for=None):
|
||||
nclusters = 8
|
||||
|
||||
|
@ -634,10 +636,10 @@ class GPURenderer:
|
|||
wc_3d.struct_7.stamp2 = self.stamp_3d2
|
||||
wc_3d.struct_7.stamp_value = self.stamp_value_3d
|
||||
wc_3d.struct_7.ev_3d = ev_3d.id
|
||||
wc_3d.struct_7.evctl_index = 0x0
|
||||
wc_3d.struct_7.evctl_index = self.ev_idx
|
||||
wc_3d.struct_7.unk_24 = 1
|
||||
wc_3d.struct_7.uuid = uuid_3d
|
||||
wc_3d.struct_7.prev_stamp_value = self.prev_stamp_value_3d >> 8
|
||||
wc_3d.struct_7.queue_cmd_count = 0
|
||||
wc_3d.struct_7.unk_30 = 0x0
|
||||
|
||||
wc_3d.set_addr() # Update inner structure addresses
|
||||
|
@ -661,10 +663,10 @@ class GPURenderer:
|
|||
start_3d.workitem_ptr = wc_3d._addr
|
||||
start_3d.context_id = self.ctx_id
|
||||
start_3d.unk_50 = 0x1
|
||||
start_3d.event_generation = self.event_control.generation
|
||||
start_3d.submission_id = self.event_control.submission_id
|
||||
start_3d.buffer_mgr_slot = self.buffer_mgr_slot
|
||||
start_3d.unk_5c = 0x0
|
||||
start_3d.prev_stamp_value = self.prev_stamp_value_3d >> 8
|
||||
start_3d.queue_cmd_count = self.prev_stamp_value_3d >> 8
|
||||
start_3d.unk_68 = 0x0
|
||||
start_3d.unk_buf_ptr = wc_3d.unk_758._addr
|
||||
start_3d.unk_buf2_ptr = wc_3d.unk_buf2._addr
|
||||
|
@ -896,10 +898,10 @@ class GPURenderer:
|
|||
wc_ta.struct_3.stamp2 = self.stamp_ta2
|
||||
wc_ta.struct_3.stamp_value = self.stamp_value_ta
|
||||
wc_ta.struct_3.ev_ta = ev_ta.id
|
||||
wc_ta.struct_3.evctl_index = 0
|
||||
wc_ta.struct_3.evctl_index = self.ev_idx
|
||||
wc_ta.struct_3.unk_584 = 0x0 # 1 for boot stuff?
|
||||
wc_ta.struct_3.uuid2 = uuid_ta
|
||||
wc_ta.struct_3.prev_stamp_value = self.prev_stamp_value_ta >> 8
|
||||
wc_ta.struct_3.queue_cmd_count = 0
|
||||
wc_ta.struct_3.unk_590 = 0 # sometimes 1?
|
||||
|
||||
wc_ta.set_addr() # Update inner structure addresses
|
||||
|
@ -916,7 +918,7 @@ class GPURenderer:
|
|||
start_ta.cmdqueue_ptr = self.wq_ta.info._addr
|
||||
start_ta.context_id = self.ctx_id
|
||||
start_ta.unk_38 = 1
|
||||
start_ta.event_generation = self.event_control.generation
|
||||
start_ta.submission_id = self.event_control.submission_id
|
||||
start_ta.buffer_mgr_slot = self.buffer_mgr_slot
|
||||
start_ta.unk_48 = 0#1 #0
|
||||
start_ta.unk_50 = 0
|
||||
|
@ -1015,6 +1017,9 @@ class GPURenderer:
|
|||
self.wq_ta.submit(wc_ta)
|
||||
|
||||
self.agx.log("Submit done")
|
||||
|
||||
#self.ev_idx = (self.ev_idx + 1) % 4
|
||||
|
||||
return work
|
||||
|
||||
def run(self):
|
||||
|
|
|
@ -73,7 +73,7 @@ class EventControl(ConstructClass):
|
|||
subcon = Struct(
|
||||
"event_count_addr" / Int64ul,
|
||||
"event_count" / ROPointer(this.event_count_addr, Int32ul),
|
||||
"generation" / Int32ul,
|
||||
"submission_id" / Int32ul,
|
||||
"cur_count" / Int32ul,
|
||||
"unk_10" / Int32ul,
|
||||
"unk_14" / Int32ul,
|
||||
|
|
|
@ -348,7 +348,7 @@ class Start3DStruct7(ConstructClass):
|
|||
"evctl_index" / Int32ul,
|
||||
"unk_24" / Int32ul,
|
||||
"uuid" / Int32ul,
|
||||
"prev_stamp_value" / Int32ul,
|
||||
"queue_cmd_count" / Int32ul,
|
||||
"unk_30" / Int32ul,
|
||||
)
|
||||
|
||||
|
@ -390,10 +390,10 @@ class Start3DCmd(ConstructClass):
|
|||
"workitem_ptr" / Int64ul, # points back at the WorkItem that this command came from
|
||||
"context_id" / Int32ul,
|
||||
"unk_50" / Int32ul,
|
||||
"event_generation" / Int32ul,
|
||||
"submission_id" / Int32ul,
|
||||
"buffer_mgr_slot" / Int32ul,
|
||||
"unk_5c" / Int32ul,
|
||||
"prev_stamp_value" / Int64ul, # 0
|
||||
"queue_cmd_count" / Int64ul, # 0
|
||||
"unk_68" / Int32ul, # 0
|
||||
"unk_buf_ptr" / Int64ul,
|
||||
"unk_buf2_ptr" / Int64ul, # 0x18 bytes
|
||||
|
@ -527,7 +527,7 @@ class StartTACmdStruct3(ConstructClass):
|
|||
"evctl_index" / Int32ul, # 0-3
|
||||
"unk_584" / Int32ul,
|
||||
"uuid2" / Int32ul,
|
||||
"prev_stamp_value" / Int32ul,
|
||||
"queue_cmd_count" / Int32ul,
|
||||
"unk_590" / Int32ul,
|
||||
)
|
||||
|
||||
|
@ -551,7 +551,7 @@ class StartTACmd(ConstructClass):
|
|||
"cmdqueue_ptr" / Int64ul,
|
||||
"context_id" / Int32ul,
|
||||
"unk_38" / Int32ul,
|
||||
"event_generation" / Int32ul,
|
||||
"submission_id" / Int32ul,
|
||||
"buffer_mgr_slot" / Int64ul,
|
||||
"unk_48" / Int64ul,
|
||||
"unk_50" / Int32ul,
|
||||
|
@ -626,7 +626,7 @@ class JobMeta(ConstructClass):
|
|||
"evctl_index" / Int32ul,
|
||||
"unk_20" / Int32ul,
|
||||
"uuid" / Int32ul,
|
||||
"prev_stamp_value" / Int32ul,
|
||||
"queue_cmd_count" / Int32ul,
|
||||
)
|
||||
|
||||
class EncoderParams(ConstructClass):
|
||||
|
|
Loading…
Reference in a new issue