mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 15:45:40 +12:00
Further simplify shader decompiler output
This commit is contained in:
parent
2fc09223aa
commit
213183895a
1 changed files with 2 additions and 2 deletions
|
@ -182,7 +182,6 @@ std::string ShaderDecompiler::getSwizzlePattern(u32 swizzle) const {
|
|||
|
||||
std::string ShaderDecompiler::getDestSwizzle(u32 destinationMask) const {
|
||||
std::string ret = ".";
|
||||
|
||||
if (destinationMask & 0b1000) {
|
||||
ret += "x";
|
||||
}
|
||||
|
@ -214,7 +213,8 @@ void ShaderDecompiler::setDest(u32 operandDescriptor, const std::string& dest, c
|
|||
return;
|
||||
}
|
||||
|
||||
decompiledShader += dest + destSwizzle + " = ";
|
||||
// Don't write destination swizzle if all lanes are getting written to
|
||||
decompiledShader += fmt::format("{}{} = ", dest, writtenLaneCount == 4 ? "" : destSwizzle);
|
||||
if (writtenLaneCount == 1) {
|
||||
decompiledShader += "float(" + value + ");\n";
|
||||
} else if (writtenLaneCount <= 3) { // We don't need to cast for vec4, as we guarantee the rhs will be a vec4
|
||||
|
|
Loading…
Add table
Reference in a new issue