Commit 8aba20f0 by Chris Forbes

Add input attachment support for VK_FORMAT_R5G6B5_UNORM_PACK16

Bug: b/131171141 Test: dEQP-VK.*r5g6b5* Change-Id: I92058fb4ecc327dd1db67b47c327aa0e5d149135 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30532Tested-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 42d10fdf
...@@ -5021,6 +5021,12 @@ namespace sw ...@@ -5021,6 +5021,12 @@ namespace sw
dst.move(2, (packed[0] >> 20) & SIMD::Int(0x3FF)); dst.move(2, (packed[0] >> 20) & SIMD::Int(0x3FF));
dst.move(3, (packed[0] >> 30) & SIMD::Int(0x3)); dst.move(3, (packed[0] >> 30) & SIMD::Int(0x3));
break; break;
case VK_FORMAT_R5G6B5_UNORM_PACK16:
dst.move(0, SIMD::Float((packed[0] >> 11) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F));
dst.move(1, SIMD::Float((packed[0] >> 5) & SIMD::Int(0x3F)) * SIMD::Float(1.0f / 0x3F));
dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F));
dst.move(3, SIMD::Float(1));
break;
default: default:
UNIMPLEMENTED("spv::ImageFormat %d", int(vkFormat)); UNIMPLEMENTED("spv::ImageFormat %d", int(vkFormat));
break; break;
......
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