early-access version 2526
This commit is contained in:
parent
165c5792cc
commit
68d478c863
26 changed files with 15576 additions and 10000 deletions
|
@ -1,7 +1,7 @@
|
|||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 2524.
|
||||
This is the source code for early-access 2526.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
|
877
dist/languages/ca.ts
vendored
877
dist/languages/ca.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/cs.ts
vendored
839
dist/languages/cs.ts
vendored
File diff suppressed because it is too large
Load diff
837
dist/languages/da.ts
vendored
837
dist/languages/da.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/de.ts
vendored
839
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/es.ts
vendored
839
dist/languages/es.ts
vendored
File diff suppressed because it is too large
Load diff
837
dist/languages/fi.ts
vendored
837
dist/languages/fi.ts
vendored
File diff suppressed because it is too large
Load diff
841
dist/languages/fr.ts
vendored
841
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load diff
883
dist/languages/id.ts
vendored
883
dist/languages/id.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/it.ts
vendored
839
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load diff
997
dist/languages/ja_JP.ts
vendored
997
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load diff
847
dist/languages/ko_KR.ts
vendored
847
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load diff
837
dist/languages/nb.ts
vendored
837
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load diff
837
dist/languages/nl.ts
vendored
837
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load diff
969
dist/languages/pl.ts
vendored
969
dist/languages/pl.ts
vendored
File diff suppressed because it is too large
Load diff
847
dist/languages/pt_BR.ts
vendored
847
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load diff
1316
dist/languages/pt_PT.ts
vendored
1316
dist/languages/pt_PT.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/ru_RU.ts
vendored
839
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load diff
837
dist/languages/sv.ts
vendored
837
dist/languages/sv.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/tr_TR.ts
vendored
839
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load diff
6202
dist/languages/vi.ts
vendored
Executable file
6202
dist/languages/vi.ts
vendored
Executable file
File diff suppressed because it is too large
Load diff
841
dist/languages/vi_VN.ts
vendored
841
dist/languages/vi_VN.ts
vendored
File diff suppressed because it is too large
Load diff
839
dist/languages/zh_CN.ts
vendored
839
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load diff
843
dist/languages/zh_TW.ts
vendored
843
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load diff
|
@ -243,10 +243,6 @@ GraphicsPipeline::GraphicsPipeline(
|
|||
case Settings::ShaderBackend::GLASM:
|
||||
if (!sources[stage].empty()) {
|
||||
assembly_programs[stage] = CompileProgram(sources[stage], AssemblyStage(stage));
|
||||
if (in_parallel) {
|
||||
// Make sure program is built before continuing when building in parallel
|
||||
glGetString(GL_PROGRAM_ERROR_STRING_NV);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Settings::ShaderBackend::SPIRV:
|
||||
|
@ -256,20 +252,18 @@ GraphicsPipeline::GraphicsPipeline(
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (in_parallel && backend != Settings::ShaderBackend::GLASM) {
|
||||
// Make sure programs have built if we are building shaders in parallel
|
||||
for (OGLProgram& program : source_programs) {
|
||||
if (program.handle != 0) {
|
||||
GLint status{};
|
||||
glGetProgramiv(program.handle, GL_LINK_STATUS, &status);
|
||||
}
|
||||
}
|
||||
if (in_parallel) {
|
||||
std::lock_guard lock{built_mutex};
|
||||
built_fence.Create();
|
||||
// Flush this context to ensure compilation commands and fence are in the GPU pipe.
|
||||
glFlush();
|
||||
built_condvar.notify_one();
|
||||
} else {
|
||||
is_built = true;
|
||||
}
|
||||
if (shader_notify) {
|
||||
shader_notify->MarkShaderComplete();
|
||||
}
|
||||
is_built = true;
|
||||
built_condvar.notify_one();
|
||||
}};
|
||||
if (thread_worker) {
|
||||
thread_worker->QueueWork(std::move(func));
|
||||
|
@ -440,7 +434,7 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
|
|||
buffer_cache.UpdateGraphicsBuffers(is_indexed);
|
||||
buffer_cache.BindHostGeometryBuffers(is_indexed);
|
||||
|
||||
if (!is_built.load(std::memory_order::relaxed)) {
|
||||
if (!IsBuilt()) {
|
||||
WaitForBuild();
|
||||
}
|
||||
const bool use_assembly{assembly_programs[0].handle != 0};
|
||||
|
@ -585,8 +579,26 @@ void GraphicsPipeline::GenerateTransformFeedbackState() {
|
|||
}
|
||||
|
||||
void GraphicsPipeline::WaitForBuild() {
|
||||
std::unique_lock lock{built_mutex};
|
||||
built_condvar.wait(lock, [this] { return is_built.load(std::memory_order::relaxed); });
|
||||
if (built_fence.handle == 0) {
|
||||
std::unique_lock lock{built_mutex};
|
||||
built_condvar.wait(lock, [this] { return built_fence.handle != 0; });
|
||||
}
|
||||
ASSERT(glClientWaitSync(built_fence.handle, 0, GL_TIMEOUT_IGNORED) != GL_WAIT_FAILED);
|
||||
is_built = true;
|
||||
}
|
||||
|
||||
bool GraphicsPipeline::IsBuilt() noexcept {
|
||||
if (is_built) {
|
||||
return true;
|
||||
}
|
||||
if (built_fence.handle == 0) {
|
||||
return false;
|
||||
}
|
||||
// Timeout of zero means this is non-blocking
|
||||
const auto sync_status = glClientWaitSync(built_fence.handle, 0, 0);
|
||||
ASSERT(sync_status != GL_WAIT_FAILED);
|
||||
is_built = sync_status != GL_TIMEOUT_EXPIRED;
|
||||
return is_built;
|
||||
}
|
||||
|
||||
} // namespace OpenGL
|
||||
|
|
|
@ -100,9 +100,7 @@ public:
|
|||
return writes_global_memory;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsBuilt() const noexcept {
|
||||
return is_built.load(std::memory_order::relaxed);
|
||||
}
|
||||
[[nodiscard]] bool IsBuilt() noexcept;
|
||||
|
||||
template <typename Spec>
|
||||
static auto MakeConfigureSpecFunc() {
|
||||
|
@ -154,7 +152,8 @@ private:
|
|||
|
||||
std::mutex built_mutex;
|
||||
std::condition_variable built_condvar;
|
||||
std::atomic_bool is_built{false};
|
||||
OGLSync built_fence{};
|
||||
bool is_built{false};
|
||||
};
|
||||
|
||||
} // namespace OpenGL
|
||||
|
|
Loading…
Reference in a new issue