From ff4fa29304ae43783a4dc208d6d74258a42afbda Mon Sep 17 00:00:00 2001 From: Liam Middlebrook Date: Wed, 10 Jul 2019 14:55:21 -0700 Subject: [PATCH] [dxbc] Add string output function for DxbcRegMask --- src/dxbc/dxbc_decoder.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dxbc/dxbc_decoder.h b/src/dxbc/dxbc_decoder.h index 65b5dafd1..459540276 100644 --- a/src/dxbc/dxbc_decoder.h +++ b/src/dxbc/dxbc_decoder.h @@ -186,6 +186,15 @@ namespace dxvk { static DxbcRegMask select(uint32_t n) { return DxbcRegMask(n == 0, n == 1, n == 2, n == 3); } + + std::string maskString() const { + std::string out = ""; + out += (m_mask & 0x1) ? "x" : ""; + out += (m_mask & 0x2) ? "y" : ""; + out += (m_mask & 0x4) ? "z" : ""; + out += (m_mask & 0x8) ? "w" : ""; + return out; + } private: @@ -485,4 +494,4 @@ namespace dxvk { }; -} \ No newline at end of file +}