This commit is contained in:
Pavel 2022-06-28 16:46:27 +03:00
parent 3d0ccedf40
commit fbfea62feb
2 changed files with 17 additions and 6 deletions

View File

@ -658,14 +658,21 @@ begin
Result.srcColorBlendFactor:=GetBlendFactor(CB_BLEND_CONTROL[i].COLOR_SRCBLEND);
Result.dstColorBlendFactor:=GetBlendFactor(CB_BLEND_CONTROL[i].COLOR_DESTBLEND);
Result.srcAlphaBlendFactor:=GetBlendFactor(CB_BLEND_CONTROL[i].ALPHA_SRCBLEND);
Result.dstAlphaBlendFactor:=GetBlendFactor(CB_BLEND_CONTROL[i].ALPHA_DESTBLEND);
Result.colorBlendOp :=GetBlendOp(CB_BLEND_CONTROL[i].COLOR_COMB_FCN);
Result.colorBlendOp:=GetBlendOp(CB_BLEND_CONTROL[i].COLOR_COMB_FCN);
Result.alphaBlendOp:=GetBlendOp(CB_BLEND_CONTROL[i].ALPHA_COMB_FCN);
if (CB_BLEND_CONTROL[i].SEPARATE_ALPHA_BLEND=0) then
begin
Result.srcAlphaBlendFactor:=Result.srcColorBlendFactor;
Result.dstAlphaBlendFactor:=Result.dstColorBlendFactor;
Result.alphaBlendOp :=Result.colorBlendOp;
end else //VkPhysicalDeviceFeatures.independentBlend
begin
Result.srcAlphaBlendFactor:=GetBlendFactor(CB_BLEND_CONTROL[i].ALPHA_SRCBLEND);
Result.dstAlphaBlendFactor:=GetBlendFactor(CB_BLEND_CONTROL[i].ALPHA_DESTBLEND);
Result.alphaBlendOp :=GetBlendOp(CB_BLEND_CONTROL[i].ALPHA_COMB_FCN);
end;
//(CB_BLEND_CONTROL[i].SEPARATE_ALPHA_BLEND=0); //VkPhysicalDeviceFeatures.independentBlend
Assert(CB_BLEND_CONTROL[i].DISABLE_ROP3 =0);
Assert(CB_BLEND_CONTROL[i].DISABLE_ROP3=0);
end;
//CB_COLOR_CONTROL.MODE //CB_DISABLE

View File

@ -659,6 +659,10 @@ end;
function OnGpuMemAlloc(addr:Pointer;len:size_t):TVkDeviceMemory;
begin
InitVulkan;
//Some games request too much video memory, relevant for built-in iGPU
if (len>1024*1024*1024) then len:=1024*1024*1024;
Result:=vkAllocHostPointer(Device.FHandle,len,MemManager.FHostVisibMt{FHostCacheMt},addr);
Assert(Result<>VK_NULL_HANDLE);
end;