Commit 6ef19361 by Chris Forbes

Add support for sampling VK_FORMAT_A2B10G10R10_UINT_PACK32

Test: dEQP-VK.*a2b10g10r10* Bug: b/131246807 Change-Id: I51ca0fb2d7bf6f41f1e230bd5111caa9a54dddf1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30952Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 05953ef0
...@@ -1542,6 +1542,19 @@ namespace sw ...@@ -1542,6 +1542,19 @@ namespace sw
c.w |= (c.w >> 4) & Short4(0x0c0c); c.w |= (c.w >> 4) & Short4(0x0c0c);
c.w |= (c.w >> 2) & Short4(0x3333); c.w |= (c.w >> 2) & Short4(0x3333);
} }
else if(state.textureFormat == VK_FORMAT_A2B10G10R10_UINT_PACK32)
{
Int4 cc;
cc = Insert(cc, Pointer<Int>(buffer[f0])[index[0]], 0);
cc = Insert(cc, Pointer<Int>(buffer[f1])[index[1]], 1);
cc = Insert(cc, Pointer<Int>(buffer[f2])[index[2]], 2);
cc = Insert(cc, Pointer<Int>(buffer[f3])[index[3]], 3);
c.x = Short4(((cc) & Int4(0x3FF)));
c.y = Short4(((cc >> 10) & Int4(0x3FF)));
c.z = Short4(((cc >> 20) & Int4(0x3FF)));
c.w = Short4(((cc >> 30) & Int4(0x3)));
}
else ASSERT(false); else ASSERT(false);
if (state.textureFormat.isSRGBformat()) if (state.textureFormat.isSRGBformat())
......
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