nir/spirv: initial handling of OpenCL.std extension opcodes
authorKarol Herbst <kherbst@redhat.com>
Thu, 12 Jul 2018 13:02:27 +0000 (15:02 +0200)
committerKarol Herbst <kherbst@redhat.com>
Tue, 5 Mar 2019 21:28:29 +0000 (22:28 +0100)
commit272e927d0e9fed6e791d706ff5d895b6c2036fc0
tree2bbe3b7fbef9275137bd4669cb86b72181094379
parentd0b47ec4df0eafe4f4afddc2a0594b392c27f426
nir/spirv: initial handling of OpenCL.std extension opcodes

Not complete, mostly just adding things as I encounter them in CTS. But
not getting far enough yet to hit most of the OpenCL.std instructions.

Anyway, this is better than nothing and covers the most common builtins.

v2: add hadd proof from Jason
    move some of the lowering into opt_algebraic and create new nir opcodes
    simplify nextafter lowering
    fix normalize lowering for inf
    rework upsample to use nir_pack_bits
    add missing files to build systems
v3: split lines of iadd/sub_sat expressions

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
12 files changed:
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_builtin_builder.c
src/compiler/nir/nir_builtin_builder.h
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opt_algebraic.py
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_alu.c
src/compiler/spirv/vtn_glsl450.c
src/compiler/spirv/vtn_opencl.c [new file with mode: 0644]
src/compiler/spirv/vtn_private.h