i965/fs: Support 16-bit store_ssbo with VK_KHR_relaxed_block_layout
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Wed, 31 Jan 2018 23:26:04 +0000 (00:26 +0100)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 1 Mar 2018 05:37:40 +0000 (21:37 -0800)
commit69be3a82ca6f3247c75d76ae97429462c8909a3c
tree99847172d151b66d303cfb55f9db276ed0e634b3
parent8dd8be0323bbc207631a39f43cff7b898af4a55a
i965/fs: Support 16-bit store_ssbo with VK_KHR_relaxed_block_layout

Restrict the use of untyped_surface_write with 16-bit pairs in
ssbo to the cases where we can guarantee that offset is multiple
of 4.

Taking into account that VK_KHR_relaxed_block_layout is available
in ANV we can only guarantee that when we have a constant offset
that is multiple of 4. For non constant offsets we will always use
byte_scattered_write.

v2: (Jason Ekstrand)
    - Assert offset_reg to be multiple of 4 if it is immediate.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp