Override imageview swizzles for channel replacement edge cases
Override imageview swizzles for channel replacement edge cases

When we decompress ETC2 RGB into a 4-channel texture, *almost*
everything just works as long as we ensure the alpha channel has the
correct values -- except that to the sampler, this is now a 4-channel
texture and so no channel replacement will be performed.

This interacts badly with border texel replacement, which occurs before
channel replacement. When a transparent border mode is used, we end up
with non-1 values in the returned alpha channel, which is wrong.

Instead, drive missing channels to 0/1 with the swizzle, which we
control independently of the texture format.

Bug: b/119620767
Test: dEQP-VK.pipeline.sampler.*
Change-Id: I2816e18fc1c36bd4de51a3e3871c75c7dc1b8867
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31388
Tested-by: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>
Presubmit-Ready: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>
Reviewed-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>

bkaradzic/SwiftShader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader