mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 10:45:28 +03:00
Correct Adreno texture binding quirk
We incorrectly determined an Adreno driver bug to require padding between binding slots but the real issue was not supporting consecutive binding writes for `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER` and was fixed by the padding slot unintentionally requiring individual writes. The quirk has now been corrected to explicitly specify this as the bug and the solution is more apt.
This commit is contained in:
parent
da8cb48933
commit
730bf504f8
@ -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<u32>(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,
|
||||
});
|
||||
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user