From cc4ff6c2a01138c44e95af90ec9ddf0f772ca4dc Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsálvez Date: Mon, 14 Nov 2016 12:08:32 +0100 Subject: spirv: add support for doubles to OpSpecConstant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2 (Jason): - Fix indent in radv change - Add vtn_u64_literal() helper to take 64 bits (Jason) Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Jason Ekstrand --- src/compiler/spirv/vtn_private.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/compiler/spirv/vtn_private.h') diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index ffa00d7f68a..7471ca1e21a 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -489,3 +489,9 @@ void vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, bool vtn_handle_glsl450_instruction(struct vtn_builder *b, uint32_t ext_opcode, const uint32_t *words, unsigned count); + +static inline uint64_t +vtn_u64_literal(const uint32_t *w) +{ + return (uint64_t)w[1] << 32 | w[0]; +} -- cgit v1.2.3