Implement Buffer Device Address for Rendering Device Vulkan and DirectX12

This commit is contained in:
thimenesup
2024-12-05 18:32:45 +01:00
committed by clayjohn
parent b3a44e8d51
commit 3d92f406b2
13 changed files with 168 additions and 14 deletions

View File

@ -905,6 +905,11 @@ void RenderingDeviceDriverD3D12::buffer_unmap(BufferID p_buffer) {
buf_info->resource->Unmap(0, &VOID_RANGE);
}
uint64_t RenderingDeviceDriverD3D12::buffer_get_device_address(BufferID p_buffer) {
const BufferInfo *buf_info = (const BufferInfo *)p_buffer.id;
return buf_info->resource->GetGPUVirtualAddress();
}
/*****************/
/**** TEXTURE ****/
/*****************/
@ -6271,6 +6276,8 @@ bool RenderingDeviceDriverD3D12::has_feature(Features p_feature) {
return vrs_capabilities.ss_image_supported;
case SUPPORTS_FRAGMENT_SHADER_WITH_ONLY_SIDE_EFFECTS:
return true;
case SUPPORTS_BUFFER_DEVICE_ADDRESS:
return true;
default:
return false;
}