diff options
author | Ilia Mirkin <[email protected]> | 2016-05-30 11:50:07 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-08-30 20:25:15 -0400 |
commit | 891d7e3c9eb71ba42a7aea20dc45bdb3d624fc82 (patch) | |
tree | 9dc459a006ffdbee45e8ad0bb761649d2e028c8e /src/compiler/glsl/builtin_variables.cpp | |
parent | 10663c648e58762eb39c7670c9397b74521e8134 (diff) |
glsl: add gl_BoundingBox and associated varying slots
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index f4ddeb99cde..90278d635c6 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1045,6 +1045,18 @@ builtin_variable_generator::generate_tcs_special_vars() "gl_TessLevelOuter")->data.patch = 1; add_output(VARYING_SLOT_TESS_LEVEL_INNER, array(float_t, 2), "gl_TessLevelInner")->data.patch = 1; + /* XXX What to do if multiple are flipped on? */ + int bbox_slot = state->ctx->Const.NoPrimitiveBoundingBoxOutput ? -1 : + VARYING_SLOT_BOUNDING_BOX0; + if (state->EXT_primitive_bounding_box_enable) + add_output(bbox_slot, array(vec4_t, 2), "gl_BoundingBoxEXT") + ->data.patch = 1; + if (state->OES_primitive_bounding_box_enable) + add_output(bbox_slot, array(vec4_t, 2), "gl_BoundingBoxOES") + ->data.patch = 1; + if (state->is_version(0, 320) || state->ARB_ES3_2_compatibility_enable) + add_output(bbox_slot, array(vec4_t, 2), "gl_BoundingBox") + ->data.patch = 1; } |