mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 18:15:14 +00:00
vulkan: Fix two validation errors introduced by shared memory changes. (#3074)
This commit is contained in:
parent
0444e590e0
commit
e2b726382e
@ -34,11 +34,11 @@ void SharedMemoryToStoragePass(IR::Program& program, const RuntimeInfo& runtime_
|
|||||||
if (program.info.stage != Stage::Compute) {
|
if (program.info.stage != Stage::Compute) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Only perform the transform if the host shared memory is insufficient
|
// Only perform the transform if there is shared memory and either host shared memory is
|
||||||
// or the device does not support VK_KHR_workgroup_memory_explicit_layout
|
// insufficient or the device does not support VK_KHR_workgroup_memory_explicit_layout
|
||||||
const u32 shared_memory_size = runtime_info.cs_info.shared_memory_size;
|
const u32 shared_memory_size = runtime_info.cs_info.shared_memory_size;
|
||||||
if (shared_memory_size <= profile.max_shared_memory_size &&
|
if (shared_memory_size == 0 || (shared_memory_size <= profile.max_shared_memory_size &&
|
||||||
profile.supports_workgroup_explicit_memory_layout) {
|
profile.supports_workgroup_explicit_memory_layout)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Add buffer binding for shared memory storage buffer.
|
// Add buffer binding for shared memory storage buffer.
|
||||||
|
@ -445,7 +445,25 @@ bool Instance::CreateDevice() {
|
|||||||
workgroup_memory_explicit_layout_features.workgroupMemoryExplicitLayout16BitAccess,
|
workgroup_memory_explicit_layout_features.workgroupMemoryExplicitLayout16BitAccess,
|
||||||
},
|
},
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
portability_features,
|
vk::PhysicalDevicePortabilitySubsetFeaturesKHR{
|
||||||
|
.constantAlphaColorBlendFactors = portability_features.constantAlphaColorBlendFactors,
|
||||||
|
.events = portability_features.events,
|
||||||
|
.imageViewFormatReinterpretation = portability_features.imageViewFormatReinterpretation,
|
||||||
|
.imageViewFormatSwizzle = portability_features.imageViewFormatSwizzle,
|
||||||
|
.imageView2DOn3DImage = portability_features.imageView2DOn3DImage,
|
||||||
|
.multisampleArrayImage = portability_features.multisampleArrayImage,
|
||||||
|
.mutableComparisonSamplers = portability_features.mutableComparisonSamplers,
|
||||||
|
.pointPolygons = portability_features.pointPolygons,
|
||||||
|
.samplerMipLodBias = portability_features.samplerMipLodBias,
|
||||||
|
.separateStencilMaskRef = portability_features.separateStencilMaskRef,
|
||||||
|
.shaderSampleRateInterpolationFunctions =
|
||||||
|
portability_features.shaderSampleRateInterpolationFunctions,
|
||||||
|
.tessellationIsolines = portability_features.tessellationIsolines,
|
||||||
|
.tessellationPointMode = portability_features.tessellationPointMode,
|
||||||
|
.triangleFans = portability_features.triangleFans,
|
||||||
|
.vertexAttributeAccessBeyondStride =
|
||||||
|
portability_features.vertexAttributeAccessBeyondStride,
|
||||||
|
},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user