diff --git a/gapis/api/vulkan/api/image.api b/gapis/api/vulkan/api/image.api index 0c6dec8d17..2a1410f00b 100644 --- a/gapis/api/vulkan/api/image.api +++ b/gapis/api/vulkan/api/image.api @@ -606,11 +606,13 @@ sub void setQueueInRange(ref!ImageObject image, VkImageSubresourceRange rng, layerCount := imageSubresourceLayerCount(image, rng) levelCount := imageSubresourceLevelCount(image, rng) for _ , _ , aspectBit in unpackImageAspectFlags(rng.aspectMask) { - for _, i, layer in image.Aspects[aspectBit].Layers { - if (i >= rng.baseArrayLayer) && (i < rng.baseArrayLayer + layerCount) { - for _, k, level in layer.Levels { - if (k >= rng.baseMipLevel) && (k < rng.baseMipLevel + levelCount) { - level.LastBoundQueue = queue + if aspectBit in image.Aspects { + for _, i, layer in image.Aspects[aspectBit].Layers { + if (i >= rng.baseArrayLayer) && (i < rng.baseArrayLayer + layerCount) { + for _, k, level in layer.Levels { + if (k >= rng.baseMipLevel) && (k < rng.baseMipLevel + levelCount) { + level.LastBoundQueue = queue + } } } } @@ -640,12 +642,14 @@ sub void writeImageSubresource(ref!ImageObject image, VkImageSubresourceRange rn layerCount := imageSubresourceLayerCount(image, rng) levelCount := imageSubresourceLevelCount(image, rng) for _ , _ , aspectBit in unpackImageAspectFlags(rng.aspectMask) { - aspect := image.Aspects[aspectBit] - for layerIndex in (rng.baseArrayLayer .. rng.baseArrayLayer + layerCount) { - layer := aspect.Layers[layerIndex] - for mipLevel in (rng.baseMipLevel .. rng.baseMipLevel + levelCount) { - level := layer.Levels[mipLevel] - write(level.Data) + if aspectBit in image.Aspects { + aspect := image.Aspects[aspectBit] + for layerIndex in (rng.baseArrayLayer .. rng.baseArrayLayer + layerCount) { + layer := aspect.Layers[layerIndex] + for mipLevel in (rng.baseMipLevel .. rng.baseMipLevel + levelCount) { + level := layer.Levels[mipLevel] + write(level.Data) + } } } } diff --git a/gapis/api/vulkan/templates/vk_spy_helpers.cpp.tmpl b/gapis/api/vulkan/templates/vk_spy_helpers.cpp.tmpl index cb35d6afbf..c68f56f3c1 100644 --- a/gapis/api/vulkan/templates/vk_spy_helpers.cpp.tmpl +++ b/gapis/api/vulkan/templates/vk_spy_helpers.cpp.tmpl @@ -278,6 +278,7 @@ uint32_t VulkanSpy::SpyOverride_vkCreateDevice( VkDevice device = *pDevice; (void)device; // Use is conditional of preprocessor defines. VulkanImports::VkDeviceFunctions* functions = nullptr; + (void)functions; // Add this device, along with the vkGetDeviceProcAddr to our map. // This way when someone calls vkGetDeviceProcAddr, we can forward