diff options
author | Kenneth Graunke <[email protected]> | 2012-04-17 11:26:29 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-04-17 16:05:15 -0700 |
commit | fbea94ae59817c1d9db9b2f1e257daeadf7c15a9 (patch) | |
tree | f42f5b5549fc8e93a8bf53adb2c2829a185e0a3c /src/glsl/glcpp/tests/008-define-empty.c.expected | |
parent | 7e35d97a02cf139746ce9e85b78fe0c651139074 (diff) |
glsl/builtins: Support stage-agnostic built-in profiles.
The built-in subsystem uses "profiles," or GLSL shaders containing
prototypes for all built-ins supported within a particular language
version (or extension) and shader stage.
Since profiles were stage-specific, we had to cut and paste almost all
the prototypes between (e.g.) 110.vert and 110.frag. Naturally, this
led to sundry cut and paste bugs, where someone fixed an issue in .frag
but neglected to update .vert, or vice-versa. Geometry shaders would
have only made this worse.
This patch introduces support for a new '.glsl' profile suffix which
contains prototypes common to all shader stages. The existing '.frag'
and '.vert' profiles need only contain the few stage-specific built-ins.
Not only does this remove duplication, it makes built-in setup slightly
faster: we don't need to re-read the common prototypes and function
bodies for both the vertex and fragment shader stage.
Internally, this was trivial. We already create a list of gl_shader
objects to search through for built-ins: one for the core language
version/stage, and additional shaders for any extensions in use. This
patch simply adds another shader to the list: core/common, core/stage,
and extensions.
The next patch will update the profiles to remove the duplication.
It's separated out purely to make review easier.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Acked-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/tests/008-define-empty.c.expected')
0 files changed, 0 insertions, 0 deletions