Commit fde26fe3 by Chris Forbes Committed by Ben Clayton

SpirvShader: Implement GLSLStd450ModfStruct

dEQP has no test coverage for this. Filed VK-GL-CTS #1728 to fix that. Bug: b/126873455 Change-Id: I69524d0f4d5d15356eedd105645637af1a4f0f0f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28608Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 2cbf4f90
...@@ -3075,6 +3075,21 @@ namespace sw ...@@ -3075,6 +3075,21 @@ namespace sw
} }
break; break;
} }
case GLSLstd450ModfStruct:
{
auto val = GenericValue(this, routine, insn.word(5));
auto valTy = getType(val.type);
for (auto i = 0u; i < valTy.sizeInComponents; i++)
{
auto whole = Floor(val.Float(i));
auto frac = Frac(val.Float(i));
dst.move(i, frac);
dst.move(i + valTy.sizeInComponents, whole);
}
break;
}
default: default:
UNIMPLEMENTED("Unhandled ExtInst %d", extInstIndex); UNIMPLEMENTED("Unhandled ExtInst %d", extInstIndex);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment