Skip to content

Commit

Permalink
Add input attachment support for VK_FORMAT_A1R5G5B5_UNORM_PACK16
Browse files Browse the repository at this point in the history
Bug: b/139687059
Change-Id: Ie0084a5f320f2ac36d55ff0950812a77401f4741
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35848
Tested-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
  • Loading branch information
chrisforbes committed Aug 31, 2019
1 parent a3ff878 commit 39a9f1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Pipeline/SpirvShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5637,6 +5637,12 @@ namespace sw
dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F));
dst.move(3, SIMD::Float(1));
break;
case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
dst.move(0, SIMD::Float((packed[0] >> 10) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F));
dst.move(1, SIMD::Float((packed[0] >> 5) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F));
dst.move(2, SIMD::Float((packed[0]) & SIMD::Int(0x1F)) * SIMD::Float(1.0f / 0x1F));
dst.move(3, SIMD::Float((packed[0] >> 15) & SIMD::Int(0x1)));
break;
default:
UNIMPLEMENTED("VkFormat %d", int(vkFormat));
break;
Expand Down

0 comments on commit 39a9f1b

Please sign in to comment.