Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShaderCache: Fix several issues in background shader compiling #6430

Merged
merged 1 commit into from
Mar 14, 2018
Merged

ShaderCache: Fix several issues in background shader compiling #6430

merged 1 commit into from
Mar 14, 2018

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented Mar 11, 2018

Fixes some bugs in the videocommon shader cache which managed to sneak in. None of these are really noticeable unless you're looking at the internal state of the shader cache, but are still important nonetheless.

  • In D3D, shaders could be compiled on the main thread, blocking startup.
  • Reduced the latency between a pipeline being requested and used in all backends in hybrid ubershader mode, when no shader stages were present.
  • Fixed a case where async compilation could cause the same UID to be appended multiple times to the UID cache.
  • Fix incorrect number of threads being used when immediately compile shaders was enabled.

std::unique_ptr<AbstractPipeline> pipeline;
std::optional<AbstractPipelineConfig> pipeline_config = GetGXPipelineConfig(uid);
if (pipeline_config)
pipeline = g_renderer->CreatePipeline(*pipeline_config);
if (g_ActiveConfig.bShaderCache)
if (g_ActiveConfig.bShaderCache && !exists_in_cache)
AppendGXPipelineUID(uid);

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

- In D3D, shaders could be compiled on the main thread, blocking
startup.
- Reduced the latency between a pipeline being requested and used in all
backends in hybrid ubershader mode, when no shader stages were present.
- Fixed a case where async compilation could cause the same UID to be
appended multiple times to the UID cache.
- Fix incorrect number of threads being used when immediately compile
shaders was enabled.
@degasus degasus merged commit 19d97f3 into dolphin-emu:master Mar 14, 2018
@stenzek stenzek deleted the uid-cache-fixes branch February 11, 2019 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants