[GPU] Shader translator: More memexport validation

This commit is contained in:
Triang3l
2018-12-21 22:24:09 +03:00
parent 73baaa8e89
commit 72e9ac5c28
2 changed files with 25 additions and 0 deletions

View File

@@ -145,6 +145,15 @@ bool ShaderTranslator::TranslateInternal(Shader* shader) {
GatherInstructionInformation(cf_a);
GatherInstructionInformation(cf_b);
}
// Cleanup invalid/unneeded memexport allocs.
for (uint32_t i = 0; i < kMaxMemExports; ++i) {
if (!memexport_eM_written_[i]) {
memexport_eA_written_ &= ~(1u << i);
}
}
if (memexport_eA_written_ == 0) {
memexport_stream_constants_.clear();
}
StartTranslation();