Enabled AVX + Changed flush to flush 2 pixels per iteration.
This commit is contained in:
parent
2815dd9e4d
commit
52b42ec975
23
src/cpu.pas
23
src/cpu.pas
@ -291,6 +291,28 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure enableAVX();
|
||||||
|
begin
|
||||||
|
if CPUID.Capabilities1^.AVX then begin
|
||||||
|
asm
|
||||||
|
PUSH EAX
|
||||||
|
PUSH ECX
|
||||||
|
PUSH EDX
|
||||||
|
XOR ECX, ECX
|
||||||
|
db $0F
|
||||||
|
db $01
|
||||||
|
db $D0
|
||||||
|
OR EAX, 7
|
||||||
|
db $0F
|
||||||
|
db $01
|
||||||
|
db $D1
|
||||||
|
POP EDX
|
||||||
|
POP ECX
|
||||||
|
POP EAX
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure init();
|
procedure init();
|
||||||
begin
|
begin
|
||||||
terminal.registerCommand('CPU', @Terminal_Command_CPU, 'CPU Info.');
|
terminal.registerCommand('CPU', @Terminal_Command_CPU, 'CPU Info.');
|
||||||
@ -300,6 +322,7 @@ begin
|
|||||||
getCPUCapabilities;
|
getCPUCapabilities;
|
||||||
getCPUClockSpeed;
|
getCPUClockSpeed;
|
||||||
enableSSE;
|
enableSSE;
|
||||||
|
enableAVX;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
@ -125,14 +125,14 @@ end;
|
|||||||
procedure Flush();
|
procedure Flush();
|
||||||
var
|
var
|
||||||
x,y : uint32;
|
x,y : uint32;
|
||||||
Back,Front : PuInt32;
|
Back,Front : PuInt64;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not(VESA.BackBuffer.Initialized) then exit;
|
if not(VESA.BackBuffer.Initialized) then exit;
|
||||||
Back:= PUint32(VESA.BackBuffer.Location);
|
Back:= PUint64(VESA.BackBuffer.Location);
|
||||||
Front:= PuInt32(VESA.Framebuffer.Location);
|
Front:= PuInt64(VESA.Framebuffer.Location);
|
||||||
for x:=0 to VESA.Framebuffer.Width-1 do begin
|
for x:=0 to (VESA.Framebuffer.Width-1) div 2 do begin
|
||||||
for y:=0 to VESA.Framebuffer.Height-1 do begin
|
for y:=0 to (VESA.Framebuffer.Height-1) div 2 do begin
|
||||||
Front[(Y * VESA.Framebuffer.Width)+X]:= Back[(Y * VESA.Framebuffer.Width)+X];
|
Front[(Y * VESA.Framebuffer.Width)+X]:= Back[(Y * VESA.Framebuffer.Width)+X];
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user