spirv: add support for doubles to OpSpecConstant

v2 (Jason):
- Fix indent in radv change
- Add vtn_u64_literal() helper to take 64 bits (Jason)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Samuel Iglesias Gonsálvez
2016-11-14 12:08:32 +01:00
parent fc1708948b
commit cc4ff6c2a0
5 changed files with 55 additions and 8 deletions

View File

@@ -117,7 +117,10 @@ anv_shader_compile_to_nir(struct anv_device *device,
assert(data + entry.size <= spec_info->pData + spec_info->dataSize);
spec_entries[i].id = spec_info->pMapEntries[i].constantID;
spec_entries[i].data = *(const uint32_t *)data;
if (spec_info->dataSize == 8)
spec_entries[i].data64 = *(const uint64_t *)data;
else
spec_entries[i].data32 = *(const uint32_t *)data;
}
}