glsl: Basic support for built-in intrinsics.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 25 Sep 2013 18:55:06 +0000 (11:55 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 29 Oct 2013 19:40:55 +0000 (12:40 -0700)
commit95629223761e076323faab93f72c955e61a38a75
tree2642d661efe44ac3a36775248e985c2ddc5a99ed
parentcc744a0947e619a4350551f5e9d5e380ac8d9e23
glsl: Basic support for built-in intrinsics.

Fix the linker to deal with intrinsic functions which are undefined
all the way down to the driver back-end, and introduce intrinsic
definition helpers in the built-in generator.

We still need to figure out what kind of interface we want for drivers
to communicate to the GLSL front-end which of the supported intrinsics
should use a default GLSL implementation and which should use a
hardware-specific override.  As there's no default GLSL implementation
for atomic ops, this seems like something we can worry about later on.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
v2: Define local helper function to generate ir_call nodes in the
    builtin generator.
src/glsl/builtin_functions.cpp
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/link_functions.cpp