Merge branch 'jekstrand_fix_blend_test_swizzling' into 'vulkan-cts-1.0'
authorPyry Haulos <phaulos@google.com>
Tue, 26 Jan 2016 17:15:25 +0000 (12:15 -0500)
committerPyry Haulos <phaulos@google.com>
Tue, 26 Jan 2016 17:15:25 +0000 (12:15 -0500)
Blend Test: Do not swizzle the ImageView

Some formats are weird. The A2R10G10B10_UNORM_PACK32 format, for example, is
stored out of order with respect to the name. From 29.3.1 Format definitions of
the spec:

A four-component, 32-bit packed unsigned normalized format that has a
2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a
10-bit G component in bits 10..19, and a 10-bit B component in bits
0..9.

The existing code will use this fact to determine that the underlying
organization for the format is BGRA, and as such will introduce swizzles in the
view. However, this swizzling is not the desired effect used by the reference
renderer, and this resulted in a miscompare (reverse RED AND BLUE channels) for
potentially any format who underlying storage order is reverse of its logical
order, AND, whose underlying storage order is not in RGBA (swizzle free) order.

If you switch the format to A2G10B10R10, the underlying organization is
RGBA and the resulting swizzle is the identity swizzle, it still works.
Also, if you add B8G8R8A8_UNORM to the list of formats, the newly added
tests all fail.

See merge request !398


Trivial merge