Skip to content

Commit 35f2419

Browse files
committed
Remove unused variables
1 parent 0af559d commit 35f2419

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

layer_gpu_support/source/layer_device_functions_image.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,6 @@ VKAPI_ATTR VkResult VKAPI_CALL layer_vkCreateImage<user_tag>(VkDevice device,
178178
}
179179
}
180180

181-
if (disable_external_compression == 2) {
182-
183-
static int total_present_like_images = 0;
184-
if (present_like) {
185-
total_present_like_images++;
186-
}
187-
}
188-
189181
// -------------------------------------------------
190182
// Rebuild the pNext chain (drop DRM modifier nodes)
191183
// -------------------------------------------------

layer_gpu_support/source/layer_instance_functions_get_physical_properties.cpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,13 @@ VKAPI_ATTR VkResult VKAPI_CALL layer_vkGetPhysicalDeviceImageFormatProperties2<u
7474
// Inspect query intent
7575
VkExternalMemoryHandleTypeFlagBits handle = (VkExternalMemoryHandleTypeFlagBits)0;
7676
bool has_external_info = false;
77-
bool saw_drm_modifier_info = false;
7877

7978
for (const VkBaseInStructure* n = (const VkBaseInStructure*)pImageFormatInfo->pNext; n; n = n->pNext) {
8079
if (n->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO) {
8180
has_external_info = true;
8281
const auto* ext = (const VkPhysicalDeviceExternalImageFormatInfo*)n;
8382
handle = (VkExternalMemoryHandleTypeFlagBits)ext->handleType;
8483
}
85-
if (n->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT) {
86-
saw_drm_modifier_info = true;
87-
}
8884
}
8985

9086
// Only act when we’re asked about DMA-BUF AND policy is enabled
@@ -112,11 +108,10 @@ VKAPI_ATTR VkResult VKAPI_CALL layer_vkGetPhysicalDeviceImageFormatProperties2<u
112108
return out;
113109
};
114110

115-
bool dropped_modifier = false;
116111
for (; src; src = src->pNext) {
117112
bool drop = false;
118113
if (src->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT) {
119-
drop = true; dropped_modifier = true;
114+
drop = true;
120115
}
121116
if (!drop) append(clone_base(src));
122117
}
@@ -160,26 +155,13 @@ VKAPI_ATTR VkResult VKAPI_CALL layer_vkGetPhysicalDeviceImageFormatProperties2KH
160155
// Inspect query intent
161156
VkExternalMemoryHandleTypeFlagBits handle = (VkExternalMemoryHandleTypeFlagBits)0;
162157
bool has_external_info = false;
163-
bool saw_drm_modifier_info = false;
164158

165159
for (const VkBaseInStructure* n = (const VkBaseInStructure*)pImageFormatInfo->pNext; n; n = n->pNext) {
166160
if (n->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO) {
167161
has_external_info = true;
168162
const auto* ext = (const VkPhysicalDeviceExternalImageFormatInfo*)n;
169163
handle = (VkExternalMemoryHandleTypeFlagBits)ext->handleType;
170164
}
171-
if (n->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT) {
172-
saw_drm_modifier_info = true;
173-
}
174-
}
175-
176-
if (has_external_info) {
177-
fprintf(stderr, "[libGPULayers] vkGetPhysicalDeviceImageFormatProperties2KHR: external handleType=0x%x\n", (unsigned)handle); fflush(stderr);
178-
} else {
179-
//fprintf(stderr, "[libGPULayers] vkGetPhysicalDeviceImageFormatProperties2KHR: no ExternalImageFormatInfo in query.\n"); fflush(stderr);
180-
}
181-
if (saw_drm_modifier_info) {
182-
fprintf(stderr, "[libGPULayers]Query includes PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT\n"); fflush(stderr);
183165
}
184166

185167
// Only act when we’re asked about DMA-BUF AND policy is enabled
@@ -208,11 +190,10 @@ VKAPI_ATTR VkResult VKAPI_CALL layer_vkGetPhysicalDeviceImageFormatProperties2KH
208190
return out;
209191
};
210192

211-
bool dropped_modifier = false;
212193
for (; src; src = src->pNext) {
213194
bool drop = false;
214195
if (src->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT) {
215-
drop = true; dropped_modifier = true;
196+
drop = true;
216197
}
217198
if (!drop) append(clone_base(src));
218199
}

0 commit comments

Comments
 (0)