[libre-riscv-dev] whole stack of vulkan llvm spirv stuff

Jacob Lifshay programmerjake at gmail.com
Fri Sep 13 11:58:16 BST 2019

On Fri, Sep 13, 2019, 03:56 Jacob Lifshay <programmerjake at gmail.com> wrote:

> On Fri, Sep 13, 2019, 03:38 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> wrote:
>> ok so i decided to compile up the amdgpu spirv compiler and spvgen
>> etc. etc. to see what it can do (and it can convert glsl fragment
>> shaders).  i copied the example from the spir-v specification PDF
>> version 1.00 revision 12, and ran these two commands:
>> ./builds/amd64/llpc/amdllpc --emit-llvm ./example/khronos.spec.vert >
>> example/khronos.spec.log.llvm
>> ./builds/amd64/llpc/amdllpc -v ./example/khronos.spec.vert >
>> example/khronos.spec.log
>> what i was looking for was:
>> * what datatypes appear to be supported (v4float, int, definitely)
>> * whether operands are polymorphic (they are)
>> * whether the output was capable of recognising vectors, creating
>> arrays and so on (it is).
>> so i'm wondering what the issue is.
> the issue is that the shaders are still scalar in the sense that SV is
> scalar if VL (but not SUBVL) were hardwired as 1. so, it supports short
> vectors (which are used for 2d, 3d, and 4d coordinates rather than for
> parallelism), but doesn't do whole-function vectorization with all the
> extra code to handle converting branching into predication. the
> whole-function vectorization is what I've been building into Kazan's spir-v
> translator.

in amdgpu, that whole-function vectorization is done in the amdgpu backend
as part of translating llvm ir to gpu machine code.

> Jacob

More information about the libre-riscv-dev mailing list