glsl: Add a method to get precision from a deref instruction

Graphics / Mesa 3D Graphics Library / Mesa - Neil Roberts [igalia.com] - 24 March 2020 23:21 EDT

Adds ir_dereference::precision(). For a normal variable dereference, the precision comes from the variable. For a record member it comes from the field within the record. For an array it can come from either, depending on where the underlying array is stored. The method recursively walks the derefs until it finds one of the first two.

0e1680a1e2a glsl: Add a method to get precision from a deref instruction
src/compiler/glsl/ir.h | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Upstream: cgit.freedesktop.org


  • Share