From 70b613926dcbf846e5e2cf528a637da3fc2ce874 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 11 Apr 2024 15:52:27 +0300 Subject: [PATCH] anv: enable capture/replay with descriptor buffers Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Part-of: --- src/intel/vulkan/anv_device.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index c280d6813b2..0be9deb047a 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -909,7 +909,7 @@ get_features(const struct anv_physical_device *pdevice, /* VK_EXT_descriptor_buffer */ .descriptorBuffer = true, - .descriptorBufferCaptureReplay = false, + .descriptorBufferCaptureReplay = true, .descriptorBufferImageLayoutIgnored = false, .descriptorBufferPushDescriptors = true, @@ -1550,11 +1550,19 @@ get_properties(const struct anv_physical_device *pdevice, } props->maxEmbeddedImmutableSamplers = MAX_EMBEDDED_SAMPLERS; - props->bufferCaptureReplayDescriptorDataSize = 1; - props->imageCaptureReplayDescriptorDataSize = 1; - props->imageViewCaptureReplayDescriptorDataSize = 1; - props->samplerCaptureReplayDescriptorDataSize = 1; - props->accelerationStructureCaptureReplayDescriptorDataSize = 1; + /* Storing a 64bit address */ + props->bufferCaptureReplayDescriptorDataSize = 8; + props->imageCaptureReplayDescriptorDataSize = 8; + /* Offset inside the reserved border color pool */ + props->samplerCaptureReplayDescriptorDataSize = 4; + + /* Not affected by replay */ + props->imageViewCaptureReplayDescriptorDataSize = 0; + /* The acceleration structure virtual address backing is coming from a + * buffer, so as long as that buffer is captured/replayed correctly we + * should always get the same address. + */ + props->accelerationStructureCaptureReplayDescriptorDataSize = 0; props->samplerDescriptorSize = ANV_SAMPLER_STATE_SIZE; props->combinedImageSamplerDescriptorSize = align(ANV_SURFACE_STATE_SIZE + ANV_SAMPLER_STATE_SIZE,