Skip to content

Commit 47e9977

Browse files
vk_compute_pipeline: Add missed meta check
1 parent 7702ceb commit 47e9977

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/video_core/renderer_vulkan/vk_compute_pipeline.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,33 @@ bool ComputePipeline::BindResources(VideoCore::BufferCache& buffer_cache,
127127
// we can skip the whole dispatch and update the tracked state instead. Also, it is not
128128
// intended to be consumed and in such rare cases (e.g. HTile introspection, CRAA) we
129129
// will need its full emulation anyways. For cases of metadata read a warning will be logged.
130-
for (const auto& desc : info->texture_buffers) {
130+
const auto IsMetaUpdate = [&](const auto& desc) {
131131
const VAddr address = desc.GetSharp(*info).base_address;
132132
if (desc.is_written) {
133133
if (texture_cache.TouchMeta(address, true)) {
134134
LOG_TRACE(Render_Vulkan, "Metadata update skipped");
135-
return false;
135+
return true;
136136
}
137137
} else {
138138
if (texture_cache.IsMeta(address)) {
139139
LOG_WARNING(Render_Vulkan, "Unexpected metadata read by a CS shader (buffer)");
140140
}
141141
}
142+
return false;
143+
};
144+
145+
for (const auto& desc : info->buffers) {
146+
if (desc.is_gds_buffer) {
147+
continue;
148+
}
149+
if (IsMetaUpdate(desc)) {
150+
return false;
151+
}
152+
}
153+
for (const auto& desc : info->texture_buffers) {
154+
if (IsMetaUpdate(desc)) {
155+
return false;
156+
}
142157
}
143158

144159
BindBuffers(buffer_cache, texture_cache, *info, binding, push_data, set_writes,

0 commit comments

Comments
 (0)