mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 19:24:12 +01:00
[dxbc] Don't use rvalue references for file streams
This commit is contained in:
parent
0a2fa590f5
commit
ba9e1f307d
@ -40,8 +40,11 @@ namespace dxvk {
|
||||
m_shader->setDebugName(m_name);
|
||||
|
||||
if (dumpPath.size() != 0) {
|
||||
m_shader->dump(std::ofstream(str::format(dumpPath, "/", m_name, ".spv"),
|
||||
std::ios_base::binary | std::ios_base::trunc));
|
||||
std::ofstream dumpStream(
|
||||
str::format(dumpPath, "/", m_name, ".spv"),
|
||||
std::ios_base::binary | std::ios_base::trunc);
|
||||
|
||||
m_shader->dump(dumpStream);
|
||||
}
|
||||
|
||||
// If requested by the user, replace
|
||||
@ -53,7 +56,7 @@ namespace dxvk {
|
||||
std::ios_base::binary);
|
||||
|
||||
if (readStream)
|
||||
m_shader->read(std::move(readStream));
|
||||
m_shader->read(readStream);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,13 +86,13 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxvkShader::dump(std::ostream&& outputStream) const {
|
||||
m_code.store(std::move(outputStream));
|
||||
void DxvkShader::dump(std::ostream& outputStream) const {
|
||||
m_code.store(outputStream);
|
||||
}
|
||||
|
||||
|
||||
void DxvkShader::read(std::istream&& inputStream) {
|
||||
m_code = SpirvCodeBuffer(std::move(inputStream));
|
||||
void DxvkShader::read(std::istream& inputStream) {
|
||||
m_code = SpirvCodeBuffer(inputStream);
|
||||
}
|
||||
|
||||
}
|
@ -137,7 +137,7 @@ namespace dxvk {
|
||||
* Can be used to store the SPIR-V code in a file.
|
||||
* \param [in] outputStream Stream to write to
|
||||
*/
|
||||
void dump(std::ostream&& outputStream) const;
|
||||
void dump(std::ostream& outputStream) const;
|
||||
|
||||
/**
|
||||
* \brief Reads SPIR-V shader
|
||||
@ -145,7 +145,7 @@ namespace dxvk {
|
||||
* Can be used to replace the compiled SPIR-V code.
|
||||
* \param [in] inputStream Stream to read from
|
||||
*/
|
||||
void read(std::istream&& inputStream);
|
||||
void read(std::istream& inputStream);
|
||||
|
||||
/**
|
||||
* \brief Sets the shader's debug name
|
||||
|
@ -16,7 +16,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
SpirvCodeBuffer::SpirvCodeBuffer(std::istream&& stream) {
|
||||
SpirvCodeBuffer::SpirvCodeBuffer(std::istream& stream) {
|
||||
stream.ignore(std::numeric_limits<std::streamsize>::max());
|
||||
std::streamsize length = stream.gcount();
|
||||
stream.clear();
|
||||
@ -122,7 +122,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void SpirvCodeBuffer::store(std::ostream&& stream) const {
|
||||
void SpirvCodeBuffer::store(std::ostream& stream) const {
|
||||
stream.write(
|
||||
reinterpret_cast<const char*>(m_code.data()),
|
||||
sizeof(uint32_t) * m_code.size());
|
||||
|
@ -22,7 +22,7 @@ namespace dxvk {
|
||||
|
||||
SpirvCodeBuffer();
|
||||
SpirvCodeBuffer(uint32_t size, const uint32_t* data);
|
||||
SpirvCodeBuffer(std::istream&& stream);
|
||||
SpirvCodeBuffer(std::istream& stream);
|
||||
|
||||
template<size_t N>
|
||||
SpirvCodeBuffer(const uint32_t (&data)[N])
|
||||
@ -146,7 +146,7 @@ namespace dxvk {
|
||||
* exists mostly for debugging purposes.
|
||||
* \param [in] stream Output stream
|
||||
*/
|
||||
void store(std::ostream&& stream) const;
|
||||
void store(std::ostream& stream) const;
|
||||
|
||||
/**
|
||||
* \brief Retrieves current insertion pointer
|
||||
|
Loading…
Reference in New Issue
Block a user