Commit 017dfff5 by Chris Forbes

Implement alpha blend support for VK_FORMAT_A2B10G10R10_UNORM_PACK32

dEQP doesn't try to render this format with blending enabled, so we missed the attachment read path. Change-Id: Ib1decc0dbdf1e9895b5ac00b478a65fd717e534c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36488Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent e7043257
......@@ -1063,6 +1063,21 @@ namespace sw
pixel.z = Short4(0xFFFFu);
pixel.w = Short4(0xFFFFu);
break;
case VK_FORMAT_A2B10G10R10_UNORM_PACK32:
{
buffer = cBuffer;
Int4 v = Int4(0);
v = Insert(v, *Pointer<Int>(buffer + 4 * x), 0);
v = Insert(v, *Pointer<Int>(buffer + 4 * x + 4), 1);
buffer += *Pointer<Int>(data + OFFSET(DrawData, colorPitchB[index]));
v = Insert(v, *Pointer<Int>(buffer + 4 * x), 2);
v = Insert(v, *Pointer<Int>(buffer + 4 * x + 4), 3);
pixel.x = Short4(v << 6) & Short4(0xFFC0u);
pixel.y = Short4(v >> 4) & Short4(0xFFC0u);
pixel.z = Short4(v >> 14) & Short4(0xFFC0u);
pixel.w = Short4(v >> 16) & Short4(0xC000u);
} break;
default:
UNIMPLEMENTED("VkFormat %d", state.targetFormat[index]);
}
......
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