1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 01:24:11 +01:00

[dxbc] Fixed bug in decoder that would return wrong component masks

This commit is contained in:
Philip Rebohle 2017-12-10 21:13:22 +01:00
parent 5739e2f60f
commit d941446ca0
2 changed files with 5 additions and 3 deletions

View File

@ -168,8 +168,9 @@ namespace dxvk {
uint32_t numOpcodeTokens = 1;
if (token.isExtended()) {
while (DxbcOpcodeTokenExt(m_op.getWord(numOpcodeTokens++)).isExtended())
continue;
numOpcodeTokens += 1;
while (DxbcOpcodeTokenExt(m_op.getWord(numOpcodeTokens)).isExtended())
numOpcodeTokens += 1;
}
m_args = m_op + numOpcodeTokens;

View File

@ -284,7 +284,8 @@ namespace dxvk {
* \c DxbcComponentSelectionMode::Select1.
*/
DxbcComponentMask componentSelection() const {
return DxbcComponentMask(bit::extract(m_token, 4, 5));
uint32_t id = bit::extract(m_token, 4, 5);
return DxbcComponentMask(id == 0, id == 1, id == 2, id == 3);
}
/**