Godot Engine – Multi-platform 2D and 3D game engine
Add buffer device address support to D3D12 driver.
Skythfa6b01802aa9
diff --git a/drivers/d3d12/rendering_device_driver_d3d12.cpp b/drivers/d3d12/rendering_device_driver_d3d12.cppindex 1fa3c8285f5..663f55c2b5f 100644--- a/drivers/d3d12/rendering_device_driver_d3d12.cpp+++ b/drivers/d3d12/rendering_device_driver_d3d12.cpp@@ -381,6 +381,7 @@ Error RenderingDeviceDriverD3D12::DescriptorHeap::allocate(uint32_t p_descriptorERR_FAIL_COND_V_MSG(FAILED(hr), ERR_CANT_CREATE, "Allocate failed with error " + vformat("0x%08ux", (uint64_t)hr) + ".");r_allocation.virtual_alloc_handle = virtual_alloc.AllocHandle;+ r_allocation.offset = offset;r_allocation.cpu_handle = get_cpu_handle(cpu_handle, offset, increment_size);r_allocation.gpu_handle = get_gpu_handle(gpu_handle, offset, increment_size);@@ -874,8 +875,11 @@ RDD::BufferID RenderingDeviceDriverD3D12::buffer_create(uint64_t p_size, BitFielp_size = p_size * frames.size();}+ bool buffer_device_address = p_usage.has_flag(RDD::BUFFER_USAGE_DEVICE_ADDRESS_BIT);+ ERR_FAIL_COND_V_MSG(buffer_device_address && !shader_capabilities.buffer_device_address_supported(), RDD::BufferID(), "Buffer device address is unsupported on this device.");+CD3DX12_RESOURCE_DESC1 resource_desc = CD3DX12_RESOURCE_DESC1::Buffer(p_size);- if (p_usage.has_flag(RDD::BUFFER_USAGE_STORAGE_BIT)) {+ if (p_usage.has_flag(RDD::BUFFER_USAGE_STORAGE_BIT) || buffer_device_address) {resource_desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;} else {resource_desc.Flags |= D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;@@ -890,12 +894,22 @@ RDD::BufferID RenderingDeviceDriverD3D12::buffer_create(uint64_t p_size, BitFielbool is_dst = p_usage.has_flag(BUFFER_USAGE_TRANSFER_TO_BIT);if (is_src && !is_dst) {// Looks like a staging buffer: CPU maps, writes sequentially, then GPU copies to VRAM.- allocation_desc.HeapType = D3D12_HEAP_TYPE_UPLOAD;+ if (buffer_device_address) {+ // Use the custom UPLOAD pool to bypass the runtime validation that prevents ALLOW_UNORDERED_ACCESS from being used.+ allocation_desc.CustomPool = custom_upload_pool.Get();+ } else {+ allocation_desc.HeapType = D3D12_HEAP_TYPE_UPLOAD;+ }initial_state = D3D12_RESOURCE_STATE_GENERIC_READ;}if (is_dst && !is_src) {// Looks like a readback buffer: GPU copies from VRAM, then CPU maps and reads.- allocation_desc.HeapType = D3D12_HEAP_TYPE_READBACK;+ if (buffer_device_address) {+ // Use the custom READBACK pool to bypass the runtime validation that prevents ALLOW_UNORDERED_ACCESS from being used.+ allocation_desc.CustomPool = custom_readback_pool.Get();+ } else {+ allocation_desc.HeapType = D3D12_HEAP_TYPE_READBACK;+ }initial_state = D3D12_RESOURCE_STATE_COPY_DEST;}} break;@@ -917,7 +931,7 @@ RDD::BufferID RenderingDeviceDriverD3D12::buffer_create(uint64_t p_size, BitFielif (misc_features_support.gpu_upload_heap_supported) {allocation_desc.HeapType = D3D12_HEAP_TYPE_GPU_UPLOAD;} else if (misc_features_support.uma_supported) {- allocation_desc.CustomPool = uma_gpu_mappable_pool.Get();+ allocation_desc.CustomPool = custom_upload_pool.Get();} else {ERR_FAIL_V_MSG(BufferID(), "GPU mappable buffers are unsupported on this device.");}@@ -949,6 +963,31 @@ RDD::BufferID RenderingDeviceDriverD3D12::buffer_create(uint64_t p_size, BitFielERR_FAIL_COND_V_MSG(!SUCCEEDED(res), BufferID(), "Can't create buffer of size: " + itos(p_size) + ", error " + vformat("0x%08ux", (uint64_t)res) + ".");+ // If device address usage is requested, create a UAV descriptor expected by spirv2dxil.+ DescriptorHeap::Allocation device_address_uav_alloc = {};+ if (buffer_device_address) {+ Error err;+ {+ MutexLock lock(resource_descriptor_heap_mutex);++ err = resource_descriptor_heap.allocate(1, device_address_uav_alloc);+ }++ if (unlikely(err != OK)) {+ ERR_FAIL_COND_V_MSG(err == ERR_OUT_OF_MEMORY, BufferID(), "Cannot create buffer because there's not enough room in the RESOURCES descriptor heap.\n"+ "Please increase the value of the rendering/rendering_device/d3d12/max_resource_descriptors project setting.");++ ERR_FAIL_V_MSG(BufferID(), "Failed to allocate buffer descriptor.");+ }++ D3D12_UNORDERED_ACCESS_VIEW_DESC uav_desc = {};+ uav_desc.Format = DXGI_FORMAT_R32_TYPELESS;+ uav_desc.ViewDimension = D3D12_UAV_DIMENSION_BUFFER;+ uav_desc.Buffer.Flags = D3D12_BUFFER_UAV_FLAG_RAW;+ uav_desc.Buffer.NumElements = p_size / 4;+ device->CreateUnorderedAccessView(buffer.Get(), nullptr, &uav_desc, device_address_uav_alloc.cpu_handle);+ }+// Bookkeep.BufferInfo *buf_info;@@ -974,6 +1013,7 @@ RDD::BufferID RenderingDeviceDriverD3D12::buffer_create(uint64_t p_size, BitFielbuf_info->states_ptr = &buf_info->owner_info.states;buf_info->gpu_virtual_address = buffer->GetGPUVirtualAddress();buf_info->size = original_size;+ buf_info->device_address_uav_alloc = device_address_uav_alloc;buf_info->flags.is_dynamic = p_usage.has_flag(BUFFER_USAGE_DYNAMIC_PERSISTENT_BIT);return BufferID(buf_info);@@ -987,6 +1027,13 @@ bool RenderingDeviceDriverD3D12::buffer_set_texel_format(BufferID p_buffer, Datavoid RenderingDeviceDriverD3D12::buffer_free(BufferID p_buffer) {BufferInfo *buf_info = (BufferInfo *)p_buffer.id;++ if (buf_info->device_address_uav_alloc.virtual_alloc_handle != 0) {+ MutexLock lock(resource_descriptor_heap_mutex);++ resource_descriptor_heap.free(buf_info->device_address_uav_alloc);+ }+if (buf_info->is_dynamic()) {buf_info->resource->Unmap(0, &VOID_RANGE);VersatileResource::free(resources_allocator, (BufferDynamicInfo *)buf_info);@@ -1044,7 +1091,9 @@ uint64_t RenderingDeviceDriverD3D12::buffer_get_dynamic_offsets(Span<BufferID> puint64_t RenderingDeviceDriverD3D12::buffer_get_device_address(BufferID p_buffer) {const BufferInfo *buf_info = (const BufferInfo *)p_buffer.id;- return buf_info->gpu_virtual_address;+ DEV_ASSERT(buf_info->device_address_uav_alloc.virtual_alloc_handle);+ // This is the format expected by spirv2dxil. The descriptor is loaded via ResourceDescriptorHeap using the index in the high 32 bits of the device address.+ return (buf_info->device_address_uav_alloc.offset << 32ull) | (0xD3ull << 56);}/*****************/@@ -3388,7 +3437,13 @@ RDD::UniformSetID RenderingDeviceDriverD3D12::uniform_set_create(VectorView<Boun// Allocate range for resource descriptors.if (uniform_set.resource_descriptor_count > 0) {- Error err = resource_descriptor_heap.allocate(uniform_set.resource_descriptor_count, uniform_set_info->resource_descriptor_heap_alloc);+ Error err;+ {+ MutexLock lock(resource_descriptor_heap_mutex);++ err = resource_descriptor_heap.allocate(uniform_set.resource_descriptor_count, uniform_set_info->resource_descriptor_heap_alloc);+ }+if (unlikely(err != OK)) {VersatileResource::free(resources_allocator, uniform_set_info);@@ -3423,6 +3478,8 @@ RDD::UniformSetID RenderingDeviceDriverD3D12::uniform_set_create(VectorView<Boun}sampler_key = hash_fmix32(sampler_key);+ MutexLock lock(sampler_descriptor_heap_mutex);+RBMap<uint32_t, SamplerDescriptorHeapAllocation>::Iterator find_result = sampler_descriptor_heap_allocations.find(sampler_key);if (find_result != sampler_descriptor_heap_allocations.end()) {uniform_set_info->sampler_descriptor_heap_alloc = &find_result->value;@@ -3433,7 +3490,12 @@ RDD::UniformSetID RenderingDeviceDriverD3D12::uniform_set_create(VectorView<BounError err = sampler_descriptor_heap.allocate(uniform_set.sampler_descriptor_count, *uniform_set_info->sampler_descriptor_heap_alloc);if (unlikely(err != OK)) {- resource_descriptor_heap.free(uniform_set_info->resource_descriptor_heap_alloc);+ {+ MutexLock resource_descriptor_heap_mutex_lock(resource_descriptor_heap_mutex);++ resource_descriptor_heap.free(uniform_set_info->resource_descriptor_heap_alloc);+ }+VersatileResource::free(resources_allocator, uniform_set_info);ERR_FAIL_COND_V_MSG(err == ERR_OUT_OF_MEMORY, UniformSetID(), "Cannot create uniform set because there's not enough room in the SAMPLERS descriptors heap.\n"@@ -3624,9 +3686,15 @@ RDD::UniformSetID RenderingDeviceDriverD3D12::uniform_set_create(VectorView<Bounvoid RenderingDeviceDriverD3D12::uniform_set_free(UniformSetID p_uniform_set) {UniformSetInfo *uniform_set_info = (UniformSetInfo *)p_uniform_set.id;- resource_descriptor_heap.free(uniform_set_info->resource_descriptor_heap_alloc);+ if (uniform_set_info->resource_descriptor_heap_alloc.virtual_alloc_handle != 0) {+ MutexLock lock(resource_descriptor_heap_mutex);++ resource_descriptor_heap.free(uniform_set_info->resource_descriptor_heap_alloc);+ }if (uniform_set_info->sampler_descriptor_heap_alloc != nullptr) {+ MutexLock lock(sampler_descriptor_heap_mutex);+if ((--uniform_set_info->sampler_descriptor_heap_alloc->use_count) == 0) {sampler_descriptor_heap.free(*uniform_set_info->sampler_descriptor_heap_alloc);sampler_descriptor_heap_allocations.erase(uniform_set_info->sampler_descriptor_heap_alloc->key);@@ -3814,7 +3882,13 @@ RenderingDeviceDriverD3D12::DescriptorHeap::Allocation RenderingDeviceDriverD3D1} else {DescriptorHeap::Allocation descriptor_allocation = {};- Error err = resource_descriptor_heap.allocate(1, descriptor_allocation);+ Error err;+ {+ MutexLock lock(resource_descriptor_heap_mutex);++ err = resource_descriptor_heap.allocate(1, descriptor_allocation);+ }+ERR_FAIL_COND_V_MSG(err == ERR_OUT_OF_MEMORY, DescriptorHeap::Allocation(), "Cannot allocate per frame descriptor because there's not enough room in the RESOURCES descriptor heap.\n""Please increase the value of the rendering/rendering_device/d3d12/max_resource_descriptors project setting.");@@ -4796,6 +4870,8 @@ void RenderingDeviceDriverD3D12::command_render_clear_attachments(CommandBufferI}void RenderingDeviceDriverD3D12::command_bind_render_pipeline(CommandBufferID p_cmd_buffer, PipelineID p_pipeline) {+ _command_check_descriptor_sets(p_cmd_buffer);+CommandBufferInfo *cmd_buf_info = (CommandBufferInfo *)p_cmd_buffer.id;const PipelineInfo *pipeline_info = (const PipelineInfo *)p_pipeline.id;@@ -5381,6 +5457,8 @@ RDD::PipelineID RenderingDeviceDriverD3D12::render_pipeline_create(// ----- COMMANDS -----void RenderingDeviceDriverD3D12::command_bind_compute_pipeline(CommandBufferID p_cmd_buffer, PipelineID p_pipeline) {+ _command_check_descriptor_sets(p_cmd_buffer);+CommandBufferInfo *cmd_buf_info = (CommandBufferInfo *)p_cmd_buffer.id;const PipelineInfo *pipeline_info = (const PipelineInfo *)p_pipeline.id;@@ -5688,10 +5766,15 @@ void RenderingDeviceDriverD3D12::end_segment() {FrameInfo &f = frames[frame_idx];// Free leftover descriptors.- for (uint32_t i = f.descriptor_allocation_count; i < f.descriptor_allocations.size(); i++) {- resource_descriptor_heap.free(f.descriptor_allocations[i]);+ if (f.descriptor_allocation_count < f.descriptor_allocations.size()) {+ MutexLock lock(resource_descriptor_heap_mutex);++ for (uint32_t i = f.descriptor_allocation_count; i < f.descriptor_allocations.size(); i++) {+ resource_descriptor_heap.free(f.descriptor_allocations[i]);+ }++ f.descriptor_allocations.resize(f.descriptor_allocation_count);}- f.descriptor_allocations.resize(f.descriptor_allocation_count);segment_begun = false;}@@ -5890,7 +5973,7 @@ bool RenderingDeviceDriverD3D12::has_feature(Features p_feature) {case SUPPORTS_FRAGMENT_SHADER_WITH_ONLY_SIDE_EFFECTS:return true;case SUPPORTS_BUFFER_DEVICE_ADDRESS:- return true;+ return shader_capabilities.buffer_device_address_supported();case SUPPORTS_IMAGE_ATOMIC_32_BIT:return true;case SUPPORTS_VULKAN_MEMORY_MODEL:@@ -5956,9 +6039,13 @@ RenderingDeviceDriverD3D12::RenderingDeviceDriverD3D12(RenderingContextDriverD3DRenderingDeviceDriverD3D12::~RenderingDeviceDriverD3D12() {rtv_descriptor_heap_pool.free(null_rtv_alloc);- for (FrameInfo &f : frames) {- for (DescriptorHeap::Allocation &alloc : f.descriptor_allocations) {- resource_descriptor_heap.free(alloc);+ {+ MutexLock lock(resource_descriptor_heap_mutex);++ for (FrameInfo &f : frames) {+ for (DescriptorHeap::Allocation &alloc : f.descriptor_allocations) {+ resource_descriptor_heap.free(alloc);+ }}}@@ -6338,7 +6425,11 @@ Error RenderingDeviceDriverD3D12::_initialize_allocator() {// If UMA is supported but GPU upload heap isn't, the same functionality can be achieved// by creating resources from a pool with the same properties as an upload heap.- if (misc_features_support.uma_supported && !misc_features_support.gpu_upload_heap_supported) {+ //+ // We also create this pool to support buffer device addresses for UPLOAD heaps.+ // The limitation preventing UPLOAD heaps from being used for unordered access is a+ // runtime validation that GPUs normally support with the same heap properties.+ if (shader_capabilities.buffer_device_address_supported() || (misc_features_support.uma_supported && !misc_features_support.gpu_upload_heap_supported)) {D3D12MA::POOL_DESC pool_desc = {};#if defined(_MSC_VER) || !defined(_WIN32)pool_desc.HeapProperties = device->GetCustomHeapProperties(0, D3D12_HEAP_TYPE_UPLOAD);@@ -6346,7 +6437,21 @@ Error RenderingDeviceDriverD3D12::_initialize_allocator() {device->GetCustomHeapProperties(&pool_desc.HeapProperties, 0, D3D12_HEAP_TYPE_UPLOAD);#endifpool_desc.HeapFlags = D3D12MA_RECOMMENDED_HEAP_FLAGS | D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS;- res = allocator->CreatePool(&pool_desc, uma_gpu_mappable_pool.GetAddressOf());+ res = allocator->CreatePool(&pool_desc, custom_upload_pool.GetAddressOf());++ ERR_FAIL_COND_V_MSG(!SUCCEEDED(res), ERR_CANT_CREATE, "D3D12MA::Allocator::CreatePool failed with error " + vformat("0x%08ux", (uint64_t)res) + ".");+ }++ // Also create a pool for READBACK heaps.+ if (shader_capabilities.buffer_device_address_supported()) {+ D3D12MA::POOL_DESC pool_desc = {};+#if defined(_MSC_VER) || !defined(_WIN32)+ pool_desc.HeapProperties = device->GetCustomHeapProperties(0, D3D12_HEAP_TYPE_READBACK);+#else+ device->GetCustomHeapProperties(&pool_desc.HeapProperties, 0, D3D12_HEAP_TYPE_READBACK);+#endif+ pool_desc.HeapFlags = D3D12MA_RECOMMENDED_HEAP_FLAGS | D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS;+ res = allocator->CreatePool(&pool_desc, custom_readback_pool.GetAddressOf());ERR_FAIL_COND_V_MSG(!SUCCEEDED(res), ERR_CANT_CREATE, "D3D12MA::Allocator::CreatePool failed with error " + vformat("0x%08ux", (uint64_t)res) + ".");}diff --git a/drivers/d3d12/rendering_device_driver_d3d12.h b/drivers/d3d12/rendering_device_driver_d3d12.hindex 36639117f0d..e3aefb94683 100644--- a/drivers/d3d12/rendering_device_driver_d3d12.h+++ b/drivers/d3d12/rendering_device_driver_d3d12.h@@ -92,6 +92,10 @@ class RenderingDeviceDriverD3D12 : public RenderingDeviceDriver {struct ShaderCapabilities {D3D_SHADER_MODEL shader_model = (D3D_SHADER_MODEL)0;bool native_16bit_ops = false;++ _FORCE_INLINE_ bool buffer_device_address_supported() const {+ return shader_model >= D3D_SHADER_MODEL_6_6;+ }};struct FormatCapabilities {@@ -135,6 +139,7 @@ class RenderingDeviceDriverD3D12 : public RenderingDeviceDriver {struct DescriptorHeap {struct Allocation {uint64_t virtual_alloc_handle = {}; // This is the handle value in "D3D12MA::VirtualAllocation".+ uint64_t offset = UINT64_MAX;D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle = {};D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle = {};};@@ -171,7 +176,11 @@ class RenderingDeviceDriverD3D12 : public RenderingDeviceDriver {};DescriptorHeap resource_descriptor_heap;+ BinaryMutex resource_descriptor_heap_mutex;+DescriptorHeap sampler_descriptor_heap;+ BinaryMutex sampler_descriptor_heap_mutex;+CPUDescriptorHeapPool resource_descriptor_heap_pool;CPUDescriptorHeapPool rtv_descriptor_heap_pool;CPUDescriptorHeapPool dsv_descriptor_heap_pool;@@ -202,7 +211,11 @@ private:/****************/Microsoft::WRL::ComPtr<D3D12MA::Allocator> allocator;- Microsoft::WRL::ComPtr<D3D12MA::Pool> uma_gpu_mappable_pool;++ // These pools allow UPLOAD and READBACK heap types to bypass runtime validation+ // for GPU features that are supported in practice, such as ALLOW_UNORDERED_ACCESS.+ Microsoft::WRL::ComPtr<D3D12MA::Pool> custom_upload_pool;+ Microsoft::WRL::ComPtr<D3D12MA::Pool> custom_readback_pool;/******************//**** RESOURCE ****/@@ -255,6 +268,7 @@ private:D3D12_GPU_VIRTUAL_ADDRESS gpu_virtual_address = {};DataFormat texel_format = DATA_FORMAT_MAX;uint64_t size = 0;+ DescriptorHeap::Allocation device_address_uav_alloc = {};struct {bool is_dynamic : 1; // Only used for tracking (e.g. Vulkan needs these checks).} flags = {};diff --git a/drivers/d3d12/rendering_shader_container_d3d12.cpp b/drivers/d3d12/rendering_shader_container_d3d12.cppindex 20e495057ae..e7cada23f9e 100644--- a/drivers/d3d12/rendering_shader_container_d3d12.cpp+++ b/drivers/d3d12/rendering_shader_container_d3d12.cpp@@ -469,6 +469,11 @@ bool RenderingShaderContainerD3D12::_convert_nir_to_dxil(const HashMap<int, nir_nir_to_dxil_options.validator_version_max = NO_DXIL_VALIDATION;nir_to_dxil_options.godot_nir_callbacks = &godot_nir_callbacks;+ // For buffer device address, minimum 6.6 is required.+ if (reflection_data.has_physical_storage_buffer_addresses) {+ nir_to_dxil_options.shader_model_max = MAX(nir_to_dxil_options.shader_model_max, SHADER_MODEL_6_6);+ }+dxil_logger logger = {};logger.log = [](void *p_priv, const char *p_msg) {#ifdef DEBUG_ENABLED@@ -751,6 +756,10 @@ bool RenderingShaderContainerD3D12::_generate_root_signature(BitField<RenderingDroot_sig_flags |= D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT;}+ if (reflection_data.has_physical_storage_buffer_addresses) {+ root_sig_flags |= D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED;+ }+root_sig_desc.Init_1_1(root_params.size(), root_params.ptr(), 0, nullptr, root_sig_flags);// Create and store the root signature and its CRC32.diff --git a/servers/rendering/rendering_device_commons.h b/servers/rendering/rendering_device_commons.hindex aa2687564bd..0e40f754971 100644--- a/servers/rendering/rendering_device_commons.h+++ b/servers/rendering/rendering_device_commons.h@@ -1165,6 +1165,7 @@ public:uint32_t fragment_output_mask = 0;PipelineType pipeline_type = PIPELINE_TYPE_RASTERIZATION;bool has_multiview = false;+ bool has_physical_storage_buffer_addresses = false;bool has_dynamic_buffers = false;uint32_t compute_local_size[3] = {};uint32_t push_constant_size = 0;diff --git a/servers/rendering/rendering_shader_container.cpp b/servers/rendering/rendering_shader_container.cppindex e9ea0c3e407..d8b774177f2 100644--- a/servers/rendering/rendering_shader_container.cpp+++ b/servers/rendering/rendering_shader_container.cpp@@ -324,9 +324,15 @@ Error RenderingShaderContainer::reflect_spirv(const String &p_shader_name, Span<"Reflection of SPIR-V shader stage '" + String(RDC::SHADER_STAGE_NAMES[p_spirv[i].shader_stage]) + "' failed parsing shader.");for (uint32_t j = 0; j < module.capability_count; j++) {- if (module.capabilities[j].value == SpvCapabilityMultiView) {- reflection.has_multiview = true;- break;+ switch (module.capabilities[j].value) {+ case SpvCapabilityMultiView: {+ reflection.has_multiview = true;+ } break;+ case SpvCapabilityPhysicalStorageBufferAddresses: {+ reflection.has_physical_storage_buffer_addresses = true;+ } break;+ default: {+ }}}@@ -685,6 +691,7 @@ void RenderingShaderContainer::set_from_shader_reflection(const ReflectShader &preflection_data.specialization_constants_count = p_reflection.specialization_constants.size();reflection_data.pipeline_type = p_reflection.pipeline_type;reflection_data.has_multiview = p_reflection.has_multiview;+ reflection_data.has_physical_storage_buffer_addresses = p_reflection.has_physical_storage_buffer_addresses;reflection_data.has_dynamic_buffers = p_reflection.has_dynamic_buffers;reflection_data.compute_local_size[0] = p_reflection.compute_local_size[0];reflection_data.compute_local_size[1] = p_reflection.compute_local_size[1];@@ -744,6 +751,7 @@ RenderingDeviceCommons::ShaderReflection RenderingShaderContainer::get_shader_reshader_refl.fragment_output_mask = reflection_data.fragment_output_mask;shader_refl.pipeline_type = reflection_data.pipeline_type;shader_refl.has_multiview = reflection_data.has_multiview;+ shader_refl.has_physical_storage_buffer_addresses = reflection_data.has_physical_storage_buffer_addresses;shader_refl.has_dynamic_buffers = reflection_data.has_dynamic_buffers;shader_refl.compute_local_size[0] = reflection_data.compute_local_size[0];shader_refl.compute_local_size[1] = reflection_data.compute_local_size[1];diff --git a/servers/rendering/rendering_shader_container.h b/servers/rendering/rendering_shader_container.hindex 15a0abfe5f6..6f04600df75 100644--- a/servers/rendering/rendering_shader_container.h+++ b/servers/rendering/rendering_shader_container.h@@ -61,6 +61,7 @@ protected:uint32_t specialization_constants_count = 0;RDC::PipelineType pipeline_type = RDC::PIPELINE_TYPE_RASTERIZATION;uint32_t has_multiview = 0;+ uint32_t has_physical_storage_buffer_addresses = 0;uint32_t has_dynamic_buffers = 0;uint32_t compute_local_size[3] = {};uint32_t set_count = 0;@@ -228,6 +229,7 @@ protected:uint32_t compute_local_size[3] = {};uint32_t push_constant_size = 0;bool has_multiview = false;+ bool has_physical_storage_buffer_addresses = false;bool has_dynamic_buffers = false;RDC::PipelineType pipeline_type = RDC::PIPELINE_TYPE_RASTERIZATION;