This allows to update them with only one memcpy().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
const VkDescriptorImageInfo *image_info)
{
RADV_FROM_HANDLE(radv_image_view, iview, image_info->imageView);
+ uint32_t *descriptor;
if (descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) {
- memcpy(dst, iview->storage_descriptor, 8 * 4);
- memcpy(dst + 8, iview->storage_fmask_descriptor, 8 * 4);
+ descriptor = iview->storage_descriptor;
} else {
- memcpy(dst, iview->descriptor, 8 * 4);
- memcpy(dst + 8, iview->fmask_descriptor, 8 * 4);
+ descriptor = iview->descriptor;
}
+ memcpy(dst, descriptor, 16 * 4);
+
if (cmd_buffer)
radv_cs_add_buffer(device->ws, cmd_buffer->cs, iview->bo, 7);
else
bool is_stencil = iview->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT;
uint32_t blk_w;
uint32_t *descriptor;
- uint32_t *fmask_descriptor;
uint32_t hw_level = 0;
if (is_storage_image) {
descriptor = iview->storage_descriptor;
- fmask_descriptor = iview->storage_fmask_descriptor;
} else {
descriptor = iview->descriptor;
- fmask_descriptor = iview->fmask_descriptor;
}
assert(image->surface.blk_w % vk_format_get_blockwidth(image->vk_format) == 0);
iview->extent.height,
iview->extent.depth,
descriptor,
- fmask_descriptor);
+ descriptor + 8);
const struct legacy_surf_level *base_level_info = NULL;
if (device->physical_device->rad_info.chip_class <= GFX9) {
uint32_t level_count;
VkExtent3D extent; /**< Extent of VkImageViewCreateInfo::baseMipLevel. */
- uint32_t descriptor[8];
- uint32_t fmask_descriptor[8];
+ uint32_t descriptor[16];
/* Descriptor for use as a storage image as opposed to a sampled image.
* This has a few differences for cube maps (e.g. type).
*/
- uint32_t storage_descriptor[8];
- uint32_t storage_fmask_descriptor[8];
+ uint32_t storage_descriptor[16];
};
struct radv_image_create_info {