mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 02:26:07 +00:00
vk_compute_pipeline: Add missed meta check
This commit is contained in:
parent
7702ceb8d1
commit
dc5b856434
|
@ -33,7 +33,7 @@ endif()
|
||||||
|
|
||||||
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
||||||
option(ENABLE_DISCORD_RPC "Enable the Discord RPC integration" ON)
|
option(ENABLE_DISCORD_RPC "Enable the Discord RPC integration" ON)
|
||||||
CMAKE_DEPENDENT_OPTION(ENABLE_USERFAULTFD "Enable write tracking using userfaultfd on unix" ON "NOT LINUX OR APPLE" OFF)
|
option(ENABLE_USERFAULTFD "Enable write tracking using userfaultfd on unix" OFF)
|
||||||
|
|
||||||
# First, determine whether to use CMAKE_OSX_ARCHITECTURES or CMAKE_SYSTEM_PROCESSOR.
|
# First, determine whether to use CMAKE_OSX_ARCHITECTURES or CMAKE_SYSTEM_PROCESSOR.
|
||||||
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||||
|
|
|
@ -127,18 +127,33 @@ bool ComputePipeline::BindResources(VideoCore::BufferCache& buffer_cache,
|
||||||
// we can skip the whole dispatch and update the tracked state instead. Also, it is not
|
// we can skip the whole dispatch and update the tracked state instead. Also, it is not
|
||||||
// intended to be consumed and in such rare cases (e.g. HTile introspection, CRAA) we
|
// intended to be consumed and in such rare cases (e.g. HTile introspection, CRAA) we
|
||||||
// will need its full emulation anyways. For cases of metadata read a warning will be logged.
|
// will need its full emulation anyways. For cases of metadata read a warning will be logged.
|
||||||
for (const auto& desc : info->texture_buffers) {
|
const auto IsMetaUpdate = [&](const auto& desc) {
|
||||||
const VAddr address = desc.GetSharp(*info).base_address;
|
const VAddr address = desc.GetSharp(*info).base_address;
|
||||||
if (desc.is_written) {
|
if (desc.is_written) {
|
||||||
if (texture_cache.TouchMeta(address, true)) {
|
if (texture_cache.TouchMeta(address, true)) {
|
||||||
LOG_TRACE(Render_Vulkan, "Metadata update skipped");
|
LOG_TRACE(Render_Vulkan, "Metadata update skipped");
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (texture_cache.IsMeta(address)) {
|
if (texture_cache.IsMeta(address)) {
|
||||||
LOG_WARNING(Render_Vulkan, "Unexpected metadata read by a CS shader (buffer)");
|
LOG_WARNING(Render_Vulkan, "Unexpected metadata read by a CS shader (buffer)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const auto& desc : info->buffers) {
|
||||||
|
if (desc.is_gds_buffer) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (IsMetaUpdate(desc)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const auto& desc : info->texture_buffers) {
|
||||||
|
if (IsMetaUpdate(desc)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BindBuffers(buffer_cache, texture_cache, *info, binding, push_data, set_writes,
|
BindBuffers(buffer_cache, texture_cache, *info, binding, push_data, set_writes,
|
||||||
|
|
Loading…
Reference in a new issue