spirv_assembly: Don't use booleans in SSBOs
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 31 May 2016 22:49:29 +0000 (15:49 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 1 Jun 2016 21:01:38 +0000 (14:01 -0700)
commit562c7aeb0ae95fb0a706861d1fe302233f371ba1
tree0530e77c9d5dbba0b5887c89c7fea719a54e5dc7
parent7dcc33d639a3cb0134028121035097d88340d487
spirv_assembly: Don't use booleans in SSBOs

The bool type in spirv isn't allowed in external storage.  From the SPIR-V
spec for OpTypeBool:

    "Values of this type can only be either true or false. There is no
    physical size or bit pattern defined for these values. If they are
    stored (in conjunction with OpVariable), they can only be used with
    logical addressing operations, not physical, and only with
    non-externally visible shader Storage Classes: Workgroup,
    CrossWorkgroup, Private, and Function."

Instead, we should use an integer and use OpSelect to convert from a
boolean to the expected 0/1 value the test wants.
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp