IT_SET_CONFIG_REG

This commit is contained in:
red-prig 2022-12-24 23:53:46 +03:00
parent dbfab8469f
commit 9363796476

View File

@ -1427,7 +1427,7 @@ var
v:DWORD;
begin
c:=pm4Hdr.count;
if c<>0 then
if (c<>0) then
For i:=0 to c-1 do
begin
r:=CONTEXT_REG_BASE+Body^.REG_OFFSET+i;
@ -1454,7 +1454,7 @@ var
v:DWORD;
begin
c:=pm4Hdr.count;
if c<>0 then
if (c<>0) then
For i:=0 to c-1 do
begin
r:=SH_REG_BASE+Body^.REG_OFFSET+i;
@ -1492,7 +1492,7 @@ begin
//mmVGT_NUM_INSTANCES__CI__VI = 0xC24D;
c:=pm4Hdr.count;
if c<>0 then
if (c<>0) then
For i:=0 to c-1 do
begin
r:=USERCONFIG_REG_BASE+Body^.REG_OFFSET+i;
@ -1507,6 +1507,24 @@ begin
end;
const
CONFIG_SPACE_START=$2000;
procedure onSetConfigReg(pm4Hdr:PM4_TYPE_3_HEADER;Body:PPM4CMDSETDATA);
var
i,c,r:WORD;
v:DWORD;
begin
c:=pm4Hdr.count;
if (c<>0) then
For i:=0 to c-1 do
begin
r:=CONFIG_SPACE_START+Body^.REG_OFFSET+i;
v:=PDWORD(@Body^.REG_DATA)[i];
SetContextReg(r,v);
end;
end;
procedure onIndexBufferSize(pm4Hdr:PM4_TYPE_3_HEADER;Body:PPM4CMDDRAWINDEXBUFFERSIZE);
begin
GPU_REGS.VGT_DMA.SIZE :=Body^.numIndices;
@ -2619,6 +2637,12 @@ begin
onSetUConfigReg(PM4_TYPE_3_HEADER(token),@PDWORD(P)[1]);
end;
IT_SET_CONFIG_REG:
begin
{$ifdef ww}Writeln('IT_SET_CONFIG_REG');{$endif}
onSetConfigReg(PM4_TYPE_3_HEADER(token),@PDWORD(P)[1]);
end;
IT_INDEX_BUFFER_SIZE:
begin
{$ifdef ww}Writeln('IT_INDEX_BUFFER_SIZE');{$endif}