1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[spirv] Declare defaulted copy and move constructor for SpirvCodeBuffer.

If a type has a destructor it will not get an implicit move constructor.

But if we declare a defaulted move constructor then we will get the copy
constructor deleted. So declare both to be defaulted.

Cuts 8.8% off shader translation time during loading in Overwatch 2.
This commit is contained in:
Tatsuyuki Ishi 2023-04-05 18:16:13 +09:00 committed by Philip Rebohle
parent 3ce3209e3e
commit 6d14fffdbd

View File

@ -21,6 +21,8 @@ namespace dxvk {
SpirvCodeBuffer();
explicit SpirvCodeBuffer(uint32_t size);
SpirvCodeBuffer(const SpirvCodeBuffer &) = default;
SpirvCodeBuffer(SpirvCodeBuffer &&) = default;
SpirvCodeBuffer(uint32_t size, const uint32_t* data);
SpirvCodeBuffer(std::istream& stream);
@ -29,6 +31,9 @@ namespace dxvk {
: SpirvCodeBuffer(N, data) { }
~SpirvCodeBuffer();
SpirvCodeBuffer &operator=(const SpirvCodeBuffer &) = default;
SpirvCodeBuffer &operator=(SpirvCodeBuffer &&) = default;
/**
* \brief Code data