renderer_vulkan: Resore color write dynamic state (#3453)

This commit is contained in:
TheTurtle
2025-08-25 00:30:59 +03:00
committed by GitHub
parent 6d98a5ab60
commit c90781d3e2
9 changed files with 61 additions and 6 deletions

View File

@@ -127,6 +127,14 @@ union CompMapping {
};
}
[[nodiscard]] u32 ApplyMask(u32 mask) const {
u32 swizzled_mask{};
for (u32 i = 0; i < 4; ++i) {
swizzled_mask |= ((mask >> i) & 1) << Map(i);
}
return swizzled_mask;
}
[[nodiscard]] CompMapping Inverse() const {
CompMapping result{};
InverseSingle(result.r, CompSwizzle::Red);