OSDN Git Service

Add support for SPIRV decorations
authorChris Forbes <chrisforbes@google.com>
Mon, 10 Dec 2018 23:10:39 +0000 (15:10 -0800)
committerChris Forbes <chrisforbes@google.com>
Thu, 17 Jan 2019 18:47:03 +0000 (18:47 +0000)
commitc25b8077a8792a59065e3124c87db3933b35bfc8
tree6f16c5469666d7fa850782278beb701792554e96
parent48d47a4912684bfa4d23d3cdaab60046bf3d0468
Add support for SPIRV decorations

This works in a single pass, and supports both toplevel and member
decorations. Includes support for 5 new opcodes:

- OpDecorate introduces a single decoration for a toplevel id.

- OpMemberDecorate introduces a single decoration for a <id,
  memberIndex> pair.

- OpDecorationGroup introduces a new value category which has no
  representation downstream at all. This is safely implemented by
  doing nothing at all [we don't need to be able to introspect later].

- OpGroupDecorate applies all decorations in a decoration group to each
  of a list of other ids.

- OpGroupMemberDecorate applies all decorations in a decoration group to
  each of a list of members (<id>, memberIndex pairs).

Bug: b/120799499

Change-Id: Iaea970b23348e70d57ddb96a4df0726cfb511e03
Reviewed-on: https://swiftshader-review.googlesource.com/c/23174
Tested-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/Pipeline/SpirvShader.cpp
src/Pipeline/SpirvShader.hpp