summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorJose Maria Casanova Crespo <[email protected]>2018-02-20 10:28:41 +0100
committerJason Ekstrand <[email protected]>2018-02-28 21:37:40 -0800
commit02266f9ba1990eac655ae98b5febf298cc2d33d8 (patch)
tree37e91dba3afa67234b139ff561c58077d56cc68d /src/compiler/spirv/vtn_variables.c
parent23ffb7c2d17f0268b209782a46e6cb838bd63585 (diff)
spirv/i965/anv: Relax push constant offset assertions being 32-bit aligned
The introduction of 16-bit types with VK_KHR_16bit_storages implies that push constant offsets could be multiple of 2-bytes. Some assertions are updated so offsets should be just multiple of size of the base type but in some cases we can not assume it as doubles aren't aligned to 8 bytes in some cases. For 16-bit types, the push constant offset takes into account the internal offset in the 32-bit uniform bucket adding 2-bytes when we access not 32-bit aligned elements. In all 32-bit aligned cases it just becomes 0. v2: Assert offsets to be aligned to the dest type size. (Jason Ekstrand) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 105b33a5671..7e8a090adde 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -753,8 +753,6 @@ _vtn_load_store_tail(struct vtn_builder *b, nir_intrinsic_op op, bool load,
}
if (op == nir_intrinsic_load_push_constant) {
- vtn_assert(access_offset % 4 == 0);
-
nir_intrinsic_set_base(instr, access_offset);
nir_intrinsic_set_range(instr, access_size);
}