From bf06654a83c965d0bff6da5f44da8ea3eabe42fd Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 30 Jul 2018 20:26:21 +0200 Subject: [PATCH] [d3d11] Remove DXVK_SHADER_READ_PATH Broken, and won't work with ICB UBOs. --- src/d3d11/d3d11_shader.cpp | 13 ------------- src/dxvk/dxvk_shader.cpp | 5 ----- src/dxvk/dxvk_shader.h | 8 -------- 3 files changed, 26 deletions(-) diff --git a/src/d3d11/d3d11_shader.cpp b/src/d3d11/d3d11_shader.cpp index f5177182..09f66c48 100644 --- a/src/d3d11/d3d11_shader.cpp +++ b/src/d3d11/d3d11_shader.cpp @@ -56,7 +56,6 @@ namespace dxvk { // If requested by the user, dump both the raw DXBC // shader and the compiled SPIR-V module to a file. const std::string dumpPath = env::getEnvVar(L"DXVK_SHADER_DUMP_PATH"); - const std::string readPath = env::getEnvVar(L"DXVK_SHADER_READ_PATH"); if (dumpPath.size() != 0) { reader.store(std::ofstream(str::format(dumpPath, "/", m_name, ".dxbc"), @@ -74,18 +73,6 @@ namespace dxvk { m_shader->dump(dumpStream); } - // If requested by the user, replace - // the shader with another file. - if (readPath.size() != 0) { - // Check whether the file exists - std::ifstream readStream( - str::format(readPath, "/", m_name, ".spv"), - std::ios_base::binary); - - if (readStream) - m_shader->read(readStream); - } - // Create shader constant buffer if necessary if (m_shader->shaderConstants().data() != nullptr) { DxvkBufferCreateInfo info; diff --git a/src/dxvk/dxvk_shader.cpp b/src/dxvk/dxvk_shader.cpp index 3979519c..55af858d 100644 --- a/src/dxvk/dxvk_shader.cpp +++ b/src/dxvk/dxvk_shader.cpp @@ -143,9 +143,4 @@ namespace dxvk { m_code.store(outputStream); } - - void DxvkShader::read(std::istream& inputStream) { - m_code = SpirvCodeBuffer(inputStream); - } - } \ No newline at end of file diff --git a/src/dxvk/dxvk_shader.h b/src/dxvk/dxvk_shader.h index 5c7878e7..5170390b 100644 --- a/src/dxvk/dxvk_shader.h +++ b/src/dxvk/dxvk_shader.h @@ -227,14 +227,6 @@ namespace dxvk { */ void dump(std::ostream& outputStream) const; - /** - * \brief Reads SPIR-V shader - * - * Can be used to replace the compiled SPIR-V code. - * \param [in] inputStream Stream to read from - */ - void read(std::istream& inputStream); - /** * \brief Sets the shader's debug name *