This commit is contained in:
Pavel 2022-12-02 11:39:14 +03:00
parent 613d6b7ab5
commit cac9ee7685
2 changed files with 11 additions and 3 deletions

View File

@ -226,6 +226,7 @@ function storageBuffer16Bit:Boolean;
function uniformBuffer16Bit:Boolean;
function storageInputOutput16:Boolean;
function sparseBinding:Boolean;
function sparseResidencyAliased:Boolean;
var
limits:record
@ -340,6 +341,11 @@ begin
Result:=Boolean(VulkanApp.FDeviceFeature.sparseBinding);
end;
function sparseResidencyAliased:Boolean;
begin
Result:=Boolean(VulkanApp.FDeviceFeature.sparseResidencyAliased);
end;
procedure FillDeviceProperties(physicalDevice:TVkPhysicalDevice);
var
prop:TVkPhysicalDeviceProperties2;

View File

@ -142,7 +142,7 @@ begin
cinfo:=Default(TVkBufferCreateInfo);
cinfo.sType :=VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
cinfo.size :=4*1024;
cinfo.size :=64*1024;
cinfo.usage :=ord(VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) or ord(VK_BUFFER_USAGE_TRANSFER_SRC_BIT);
cinfo.sharingMode:=VK_SHARING_MODE_EXCLUSIVE;
cinfo.pNext :=@buf_ext;
@ -163,12 +163,14 @@ var
FHandle:TVkBuffer;
begin
Result:=0;
if not sparseBinding then Exit;
mr:=Default(TVkMemoryRequirements);
cinfo:=Default(TVkBufferCreateInfo);
cinfo.sType :=VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
cinfo.flags :=ord(VK_BUFFER_CREATE_SPARSE_BINDING_BIT) or ord(VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT) or ord(VK_BUFFER_CREATE_SPARSE_ALIASED_BIT);
cinfo.size :=4*1024;
cinfo.flags :=ord(VK_BUFFER_CREATE_SPARSE_BINDING_BIT);
cinfo.size :=64*1024;
cinfo.usage :=ord(VK_BUFFER_USAGE_STORAGE_BUFFER_BIT) or ord(VK_BUFFER_USAGE_TRANSFER_SRC_BIT);
cinfo.sharingMode:=VK_SHARING_MODE_EXCLUSIVE;
cinfo.pNext :=@buf_ext;