Commit 30857ca2 by Nicolas Capens Committed by Nicolas Capens

Enable reading missing 16-bit component formats in the Blitter

R16_SNORM, R16_UNORM, and R16G16_SNORM are required for computing cube corner pixels for decompressed EAC formats. Bug: b/138944025 Change-Id: I35a4d448e04bba7abc0e34250d153affe7fb1db5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34829 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent b121b746
......@@ -281,9 +281,11 @@ namespace sw
c.w = float(0xFF);
break;
case VK_FORMAT_R16_SINT:
case VK_FORMAT_R16_SNORM:
c.x = Float(Int(*Pointer<Short>(element)));
c.w = float(0x7FFF);
break;
case VK_FORMAT_R16_UNORM:
case VK_FORMAT_R16_UINT:
c.x = Float(Int(*Pointer<UShort>(element)));
c.w = float(0xFFFF);
......@@ -341,6 +343,7 @@ namespace sw
c.w = float(0xFF);
break;
case VK_FORMAT_R16G16_SINT:
case VK_FORMAT_R16G16_SNORM:
c.x = Float(Int(*Pointer<Short>(element + 0)));
c.y = Float(Int(*Pointer<Short>(element + 2)));
c.w = float(0x7FFF);
......
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