summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_image.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-07-28 23:08:10 +0200
committerMarek Olšák <[email protected]>2017-08-04 02:10:04 +0200
commit59144d4bf5e49cb4085ae723b7e77715922abd61 (patch)
tree8fea336ce8cb5bd3096d4d02f838089ebe16df93 /src/amd/vulkan/radv_image.c
parent90594002474fa2118555d1a08d67c1fee8f2c24c (diff)
ac/surface: increment surf_index only when tile swizzle is allowed
Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_image.c')
-rw-r--r--src/amd/vulkan/radv_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 499287d459b..8456d3ab1f6 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -809,7 +809,7 @@ radv_image_create(VkDevice _device,
image->shareable = vk_find_struct_const(pCreateInfo->pNext,
EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR) != NULL;
if (!vk_format_is_depth(pCreateInfo->format) && !create_info->scanout && !image->shareable) {
- image->info.surf_index = p_atomic_inc_return(&device->image_mrt_offset_counter) - 1;
+ image->info.surf_index = &device->image_mrt_offset_counter;
}
radv_init_surface(device, &image->surface, create_info);