mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +01:00
Merge pull request #20 from Guy1524/shaderReadFix
Check if shader in READ_PATH exists before using it
This commit is contained in:
commit
952ac5d5f9
@ -46,9 +46,13 @@ namespace dxvk {
|
||||
// If requested by the user, replace
|
||||
// the shader with another file.
|
||||
if (readPath.size() != 0) {
|
||||
m_shader->read(std::ifstream(
|
||||
// Check whether the file exists
|
||||
std::ifstream readStream(
|
||||
str::format(readPath, "/", m_name, ".spv"),
|
||||
std::ios_base::binary));
|
||||
std::ios_base::binary);
|
||||
|
||||
if (readStream)
|
||||
m_shader->read(std::move(readStream));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user