Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/ShaderCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1448,9 +1448,18 @@ namespace SIE
}
logger::debug("Compiling {} {}:{}:{:X} to {}", pathString, magic_enum::enum_name(type), magic_enum::enum_name(shaderClass), descriptor, MergeDefinesString(defines));

// compile shaders
// compile shaders — match Utils/D3D.cpp CompileShader flag policy (strictness, optional toggles, validation).
ID3DBlob* errorBlob = nullptr;
const uint32_t flags = !globals::state->IsDeveloperMode() ? D3DCOMPILE_OPTIMIZATION_LEVEL3 : D3DCOMPILE_DEBUG;
uint32_t flags = !globals::state->IsDeveloperMode() ? (D3DCOMPILE_ENABLE_STRICTNESS | D3DCOMPILE_OPTIMIZATION_LEVEL3) : D3DCOMPILE_DEBUG;
if (globals::state->enablePartialPrecision.load(std::memory_order_relaxed)) {
flags |= D3DCOMPILE_PARTIAL_PRECISION;
}
if (globals::state->enableAvoidFlowControl.load(std::memory_order_relaxed)) {
flags |= D3DCOMPILE_AVOID_FLOW_CONTROL;
}
Comment thread
davo0411 marked this conversation as resolved.
if (useDiskCache) {
flags |= D3DCOMPILE_SKIP_VALIDATION;
}
Comment thread
davo0411 marked this conversation as resolved.

// Track includes
TrackingIncludeHandler includeHandler(std::filesystem::path(path).parent_path());
Expand Down
Loading