diff --git a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h index fa5ed18d..51154475 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h @@ -932,16 +932,18 @@ namespace skyline::gpu::interconnect { } if (!program.info.texture_descriptors.empty()) { - if (!gpu.traits.quirks.needsTextureBindingPadding) + if (!gpu.traits.quirks.needsIndividualTextureBindingWrites) descriptorSetWrites.push_back(vk::WriteDescriptorSet{ .dstBinding = bindingIndex, .descriptorCount = static_cast(program.info.texture_descriptors.size()), .descriptorType = vk::DescriptorType::eCombinedImageSampler, .pImageInfo = imageInfo.data() + imageInfo.size(), }); + else + descriptorSetWrites.reserve(descriptorSetWrites.size() + program.info.texture_descriptors.size()); for (auto &texture : program.info.texture_descriptors) { - if (gpu.traits.quirks.needsTextureBindingPadding) + if (gpu.traits.quirks.needsIndividualTextureBindingWrites) descriptorSetWrites.push_back(vk::WriteDescriptorSet{ .dstBinding = bindingIndex, .descriptorCount = 1, @@ -952,7 +954,7 @@ namespace skyline::gpu::interconnect { layoutBindings.push_back(vk::DescriptorSetLayoutBinding{ .binding = bindingIndex++, .descriptorType = vk::DescriptorType::eCombinedImageSampler, - .descriptorCount = gpu.traits.quirks.needsTextureBindingPadding ? 1U : 2U, + .descriptorCount = 1, .stageFlags = pipelineStage.vkStage, }); diff --git a/app/src/main/cpp/skyline/gpu/trait_manager.cpp b/app/src/main/cpp/skyline/gpu/trait_manager.cpp index b1bd53f4..e55889aa 100644 --- a/app/src/main/cpp/skyline/gpu/trait_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/trait_manager.cpp @@ -130,7 +130,7 @@ namespace skyline::gpu { TraitManager::QuirkManager::QuirkManager(const vk::PhysicalDeviceProperties &deviceProperties, const vk::PhysicalDeviceDriverProperties &driverProperties) { switch (driverProperties.driverID) { case vk::DriverId::eQualcommProprietary: { - needsTextureBindingPadding = true; + needsIndividualTextureBindingWrites = true; break; } @@ -141,8 +141,8 @@ namespace skyline::gpu { std::string TraitManager::QuirkManager::Summary() { return fmt::format( - "\n* Needs Texture Binding Padding: {}", - needsTextureBindingPadding + "\n* Needs Individual Texture Binding Writes: {}", + needsIndividualTextureBindingWrites ); } diff --git a/app/src/main/cpp/skyline/gpu/trait_manager.h b/app/src/main/cpp/skyline/gpu/trait_manager.h index 09e7bc73..a69c693d 100644 --- a/app/src/main/cpp/skyline/gpu/trait_manager.h +++ b/app/src/main/cpp/skyline/gpu/trait_manager.h @@ -39,7 +39,7 @@ namespace skyline::gpu { * @brief Manages a list of any vendor/device-specific errata in the host GPU */ struct QuirkManager { - bool needsTextureBindingPadding{}; //!< [Adreno Proprietary] A bug that requires a padding descriptor slot for VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER + bool needsIndividualTextureBindingWrites{}; //!< [Adreno Proprietary] A bug that requires descriptor set writes for VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER to be done individually with descriptorCount = 1 rather than batched QuirkManager() = default;