Commit bdb68078 by Alexis Hetu Committed by Alexis Hétu

Don't blend integer formats

True integer formats should not use blend modes. This cl explicitly disables any blend operation on render targets using integer formats. Bug: b/153203552 Change-Id: Ia756953c61caef8e32e55aa31126044973ae1870 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43548 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 3942f5cb
...@@ -1109,7 +1109,7 @@ void PixelRoutine::readPixel(int index, const Pointer<Byte> &cBuffer, const Int ...@@ -1109,7 +1109,7 @@ void PixelRoutine::readPixel(int index, const Pointer<Byte> &cBuffer, const Int
void PixelRoutine::alphaBlend(int index, const Pointer<Byte> &cBuffer, Vector4s &current, const Int &x) void PixelRoutine::alphaBlend(int index, const Pointer<Byte> &cBuffer, Vector4s &current, const Int &x)
{ {
if(!state.blendState[index].alphaBlendEnable) if(!state.blendState[index].alphaBlendEnable || vk::Format(state.targetFormat[index]).isUnnormalizedInteger())
{ {
return; return;
} }
...@@ -1869,7 +1869,7 @@ void PixelRoutine::blendFactorAlpha(Vector4f &blendFactor, const Vector4f &oC, c ...@@ -1869,7 +1869,7 @@ void PixelRoutine::blendFactorAlpha(Vector4f &blendFactor, const Vector4f &oC, c
void PixelRoutine::alphaBlend(int index, const Pointer<Byte> &cBuffer, Vector4f &oC, const Int &x) void PixelRoutine::alphaBlend(int index, const Pointer<Byte> &cBuffer, Vector4f &oC, const Int &x)
{ {
if(!state.blendState[index].alphaBlendEnable) if(!state.blendState[index].alphaBlendEnable || vk::Format(state.targetFormat[index]).isUnnormalizedInteger())
{ {
return; return;
} }
......
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