From 28fffc6fd917c25049d022fba3ca9378ce2c882b Mon Sep 17 00:00:00 2001 From: Pavel <68122101+red-prig@users.noreply.github.com> Date: Wed, 12 Oct 2022 13:22:12 +0300 Subject: [PATCH] + --- chip/pm4defs.pas | 21 +++++++++++---------- chip/ps4_videodrv.pas | 37 ++++++++----------------------------- 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/chip/pm4defs.pas b/chip/pm4defs.pas index 6bc862c1..1734a671 100644 --- a/chip/pm4defs.pas +++ b/chip/pm4defs.pas @@ -341,16 +341,16 @@ type PEVENTWRITEEOP=^TEVENTWRITEEOP; TEVENTWRITEEOP=packed record EVENT_CNTL:bitpacked record - EVENT_TYPE:bit6; //6 ///< event type written to VGT_EVENT_INITIATOR - Reserved1:bit2; //2 - EVENT_INDEX:bit4; //4 ///< event index + EVENT_TYPE:bit6; //6 ///< event type written to VGT_EVENT_INITIATOR + Reserved1:bit2; //2 + EVENT_INDEX:bit4; //4 ///< event index - tcl1VolActionEna__CI:bit1; //1 - tcVolActionEna__CI :bit1; //1 - reserved2:bit1; //1 - tcWbActionEna__CI:bit1; //1 - tcl1ActionEna__CI:bit1; //1 - tcActionEna__CI:bit1; //1 + tcl1VolActionEna__CI:bit1; //1 //cacheAction + tcVolActionEna__CI :bit1; //1 //cacheAction + reserved2:bit1; //1 //cacheAction + tcWbActionEna__CI:bit1; //1 //cacheAction + tcl1ActionEna__CI:bit1; //1 //cacheAction + tcActionEna__CI:bit1; //1 //cacheAction reserved3:bit2; //2 invalidateL2__SI:bit1; //1 @@ -363,7 +363,8 @@ type ADDRESS_LO:DWORD; ///< low bits of address DATA_CNTL:bitpacked record addressHi:bit16; //16 ///< high bits of address - reserved6:bit8; //24 ///< reserved (dstSelector & 1) + destTcL2:bit1; //1 ///< (dstSelector & 1) + reserved6:bit7; //24 ///< reserved intSel:bit2; //26 ///< selects interrupt action for end-of-pipe (25 bit is eop) reserved7:bit3; //29 ///< reserved dataSel:bit3; //32 ///< selects source of data (srcSelector) diff --git a/chip/ps4_videodrv.pas b/chip/ps4_videodrv.pas index f82e8f44..e6b507ed 100644 --- a/chip/ps4_videodrv.pas +++ b/chip/ps4_videodrv.pas @@ -623,7 +623,7 @@ var adr:PDWORD; begin QWORD(adr):=QWORD(Body^.ADDRES_LO) or (QWORD(Body^.ADDRES_HI) shl $20); - {$ifdef ww}Writeln('adr:',HexStr(adr),' data:',Body^.DATA);{$endif} + {$ifdef ww}Writeln('adr:',HexStr(adr),' data:',HexStr(Body^.DATA,8));{$endif} GFXMicroEngine.PushCmd(GFXRing.CmdBuffer); GFXMicroEngine.PushFlip(GFXRing.Current^.Flip,Body^.DATA,adr,False); @@ -634,7 +634,7 @@ begin {$ifdef ww}writeln;{$endif} GFXMicroEngine.PushCmd(GFXRing.CmdBuffer); - GFXMicroEngine.PushFlip(GFXRing.Current^.Flip,0,nil,True); + GFXMicroEngine.PushFlip(GFXRing.Current^.Flip,0,nil,False{True}); end; procedure onPrepareFlipWithEopInterruptLabel(pm4Hdr:PM4_TYPE_3_HEADER;Body:PPM4PrepareFlipWithEopInterrupt); @@ -642,10 +642,10 @@ var adr:PDWORD; begin QWORD(adr):=QWORD(Body^.ADDRES_LO) or (QWORD(Body^.ADDRES_HI) shl $20); - {$ifdef ww}Writeln('adr:',HexStr(adr),' data:',Body^.DATA);{$endif} + {$ifdef ww}Writeln('adr:',HexStr(adr),' data:',HexStr(Body^.DATA,8));{$endif} GFXMicroEngine.PushCmd(GFXRing.CmdBuffer); - GFXMicroEngine.PushFlip(GFXRing.Current^.Flip,Body^.DATA,adr,True); + GFXMicroEngine.PushFlip(GFXRing.Current^.Flip,Body^.DATA,adr,False{True}); end; procedure onEventWriteEop(pm4Hdr:PM4_TYPE_3_HEADER;Body:PEVENTWRITEEOP); @@ -664,7 +664,7 @@ begin end; {$endif} - if ((Body^.DATA_CNTL.reserved6 and 1)<>0) then + if (Body^.DATA_CNTL.destTcL2<>0) then begin {$ifdef ww}Writeln('kEventWriteDestTcL2');{$endif} end else @@ -674,8 +674,8 @@ begin {$ifdef ww} Case Body^.DATA_CNTL.dataSel of - kEventWriteSource32BitsImmediate :Writeln('kEventWriteSource32BitsImmediate adr:',HexStr(adr),' data:',Body^.DATA_LO); - kEventWriteSource64BitsImmediate :Writeln('kEventWriteSource64BitsImmediate adr:',HexStr(adr),' data:',PQWORD(@Body^.DATA_LO)^); + kEventWriteSource32BitsImmediate :Writeln('kEventWriteSource32BitsImmediate adr:',HexStr(adr),' data:',HexStr(Body^.DATA_LO,8)); + kEventWriteSource64BitsImmediate :Writeln('kEventWriteSource64BitsImmediate adr:',HexStr(adr),' data:',HexStr(PQWORD(@Body^.DATA_LO)^,16)); kEventWriteSourceGlobalClockCounter :Writeln('kEventWriteSourceGlobalClockCounter adr:',HexStr(adr),' data:',GetTickCount64*1000); kEventWriteSourceGpuCoreClockCounter:Writeln('kEventWriteSourceGpuCoreClockCounter adr:',HexStr(adr),' data:',GetTickCount64*1000); else; @@ -683,28 +683,7 @@ begin {$endif} GFXMicroEngine.PushCmd(GFXRing.CmdBuffer); - GFXMicroEngine.PushEop(adr,PQWORD(@Body^.DATA_LO)^,Body^.DATA_CNTL.dataSel,(Body^.DATA_CNTL.intSel<>0)); - - { - Case Body^.DATA_CNTL.dataSel of - EVENTWRITEEOP_DATA_SEL_DISCARD:;//nop - kEventWriteSource32BitsImmediate :PDWORD(adr)^:=Body^.DATA_LO; - kEventWriteSource64BitsImmediate :PQWORD(adr)^:=PQWORD(@Body^.DATA_LO)^; - kEventWriteSourceGlobalClockCounter , - kEventWriteSourceGpuCoreClockCounter:PQWORD(adr)^:=GetTickCount64*1000; - else - Assert(False); - end; - - if (Body^.DATA_CNTL.intSel<>0) then - begin - {$ifdef ww}Writeln('Interrupt');{$endif} - - vSubmitDone; - - post_event_eop; - end; - } + GFXMicroEngine.PushEop(adr,PQWORD(@Body^.DATA_LO)^,Body^.DATA_CNTL.dataSel,True{(Body^.DATA_CNTL.intSel<>0)}); end;