From d799b44d913ec6e6ac9925eac48293e3ed7fba6f Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Sun, 26 Sep 2021 19:46:10 +0200 Subject: [PATCH] [dxso] Ensure pow base is >= 0 in LIT --- src/dxso/dxso_compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxso/dxso_compiler.cpp b/src/dxso/dxso_compiler.cpp index 8ba8283c..f7bd312b 100644 --- a/src/dxso/dxso_compiler.cpp +++ b/src/dxso/dxso_compiler.cpp @@ -1997,7 +1997,7 @@ namespace dxvk { if (mask[0]) resultIndices[index++] = m_module.constf32(1.0f); if (mask[1]) resultIndices[index++] = m_module.opFMax(scalarTypeId, srcX, m_module.constf32(0)); - if (mask[2]) resultIndices[index++] = m_module.opPow (scalarTypeId, srcY, power); + if (mask[2]) resultIndices[index++] = m_module.opPow (scalarTypeId, m_module.opFMax(scalarTypeId, srcY, m_module.constf32(0)), power); if (mask[3]) resultIndices[index++] = m_module.constf32(1.0f); const uint32_t boolType = m_module.defBoolType();