OSDN Git Service

Refactor vector packing.
authorNicolas Capens <capn@google.com>
Wed, 27 Sep 2017 15:47:35 +0000 (11:47 -0400)
committerNicolas Capens <nicolascapens@google.com>
Wed, 27 Sep 2017 19:46:15 +0000 (19:46 +0000)
commit33438a6882d629139617d80cc7fdbc687b71a794
tree4e8c64bc7d54c9870d1f61e719bfc60d8d2afcd3
parente6c3aa239f28e4bb397d2abf50bfbef3ab9a7389
Refactor vector packing.

x86 vector packing instructions always treat the input as having signed
integer components, but can perform signed or unsigned saturation on
the output. In Reactor the Pack() intrinsic has overloads which
differentiate between them based on the signedness of the input, but
this is confusing.

Also simplify emulation of saturating add/subtract.

Bug b/37496082

Change-Id: I0625fff429ffb40f42baf9600c7760d9858b5d89
Reviewed-on: https://swiftshader-review.googlesource.com/12548
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/Main/FrameBuffer.cpp
src/Reactor/LLVMReactor.cpp
src/Reactor/Reactor.hpp
src/Reactor/SubzeroReactor.cpp
src/Reactor/x86.hpp
src/Renderer/Blitter.cpp
src/Renderer/QuadRasterizer.cpp
src/Shader/PixelPipeline.cpp
src/Shader/PixelRoutine.cpp
src/Shader/SamplerCore.cpp