radv/meta: missing initialisations in create_pass().
authorXavier Bouchoux <xavierb@gmail.com>
Thu, 31 Aug 2017 08:12:52 +0000 (10:12 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 3 Sep 2017 22:26:39 +0000 (00:26 +0200)
Otherwise radv_cmd_state_setup_attachments() will complain it has no clearvalues,
when called via radv_process_depth_image_inplace().

v2: use LOAD/STORE instead of DONT_CARE, to preserve stencil values.

Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_decompress.c

index f68ce8d2b06f858c777795ebede80d0067ee1774..1395207b839b02b59f898167b2bbd7404c9f18ee 100644 (file)
@@ -38,10 +38,13 @@ create_pass(struct radv_device *device,
        const VkAllocationCallbacks *alloc = &device->meta_state.alloc;
        VkAttachmentDescription attachment;
 
+       attachment.flags = 0;
        attachment.format = VK_FORMAT_D32_SFLOAT_S8_UINT;
        attachment.samples = samples;
        attachment.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
        attachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
+       attachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
+       attachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
        attachment.initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
        attachment.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;