mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
gfxstream: move variables into the #ifdef that uses them
../src/gfxstream/guest/vulkan_enc/ResourceTracker.cpp:7585:14: warning: unused variable ‘actualFormat’ [-Wunused-variable]
7585 | VkFormat actualFormat = imageInfo.createInfo.format;
| ^~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36171>
This commit is contained in:
parent
2308960bed
commit
e39a41e104
1 changed files with 2 additions and 2 deletions
|
|
@ -7581,8 +7581,6 @@ void ResourceTracker::on_vkCmdClearColorImage(void* context, VkCommandBuffer com
|
|||
return;
|
||||
}
|
||||
|
||||
auto& imageInfo = imageInfoIt->second;
|
||||
VkFormat actualFormat = imageInfo.createInfo.format;
|
||||
VkClearColorValue convertedColor = *pColor;
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
|
|
@ -7590,6 +7588,8 @@ void ResourceTracker::on_vkCmdClearColorImage(void* context, VkCommandBuffer com
|
|||
// it'll have the identical parameters, so we need to convert the linearized
|
||||
// clear color back to sRGB at this point.
|
||||
// TODO(b/420857458): revise the allocation logic to support mutable formats better
|
||||
auto& imageInfo = imageInfoIt->second;
|
||||
VkFormat actualFormat = imageInfo.createInfo.format;
|
||||
if (imageInfo.hasAnb && srgbFormatNeedsConversionForClearColor(actualFormat)) {
|
||||
// Perform linear to srgb conversion
|
||||
// Backing image is UNORM for vkCmdClearColorImage so we convert pColor
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue