"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;
}
int idx = var->data.location + offset + i;
bool is_patch_generic = var->data.patch &&
idx != VARYING_SLOT_TESS_LEVEL_INNER &&
- idx != VARYING_SLOT_TESS_LEVEL_OUTER;
+ idx != VARYING_SLOT_TESS_LEVEL_OUTER &&
+ idx != VARYING_SLOT_BOUNDING_BOX0 &&
+ idx != VARYING_SLOT_BOUNDING_BOX1;
GLbitfield64 bitfield;
if (is_patch_generic) {
ENUM(VARYING_SLOT_PNTC),
ENUM(VARYING_SLOT_TESS_LEVEL_OUTER),
ENUM(VARYING_SLOT_TESS_LEVEL_INNER),
+ ENUM(VARYING_SLOT_BOUNDING_BOX0),
+ ENUM(VARYING_SLOT_BOUNDING_BOX1),
ENUM(VARYING_SLOT_VAR0),
ENUM(VARYING_SLOT_VAR1),
ENUM(VARYING_SLOT_VAR2),
VARYING_SLOT_PNTC, /* FS only */
VARYING_SLOT_TESS_LEVEL_OUTER, /* Only appears as TCS output. */
VARYING_SLOT_TESS_LEVEL_INNER, /* Only appears as TCS output. */
+ VARYING_SLOT_BOUNDING_BOX0, /* Only appears as TCS output. */
+ VARYING_SLOT_BOUNDING_BOX1, /* Only appears as TCS output. */
VARYING_SLOT_VAR0, /* First generic varying slot */
/* the remaining are simply for the benefit of gl_varying_slot_name()
* and not to be construed as an upper bound:
#define VARYING_BIT_PNTC BITFIELD64_BIT(VARYING_SLOT_PNTC)
#define VARYING_BIT_TESS_LEVEL_OUTER BITFIELD64_BIT(VARYING_SLOT_TESS_LEVEL_OUTER)
#define VARYING_BIT_TESS_LEVEL_INNER BITFIELD64_BIT(VARYING_SLOT_TESS_LEVEL_INNER)
+#define VARYING_BIT_BOUNDING_BOX0 BITFIELD64_BIT(VARYING_SLOT_BOUNDING_BOX0)
+#define VARYING_BIT_BOUNDING_BOX1 BITFIELD64_BIT(VARYING_SLOT_BOUNDING_BOX1)
#define VARYING_BIT_VAR(V) BITFIELD64_BIT(VARYING_SLOT_VAR0 + (V))
/*@}*/
case VARYING_SLOT_LAYER:
case VARYING_SLOT_TESS_LEVEL_OUTER:
case VARYING_SLOT_TESS_LEVEL_INNER:
+ case VARYING_SLOT_BOUNDING_BOX0:
+ case VARYING_SLOT_BOUNDING_BOX1:
return GL_FALSE;
default:
return GL_TRUE;
bool LowerCsDerivedVariables; /**< Lower gl_GlobalInvocationID and
* gl_LocalInvocationIndex based on
* other builtin variables. */
+
+ /** GL_OES_primitive_bounding_box */
+ bool NoPrimitiveBoundingBoxOutput;
};
"fragment.(twenty-five)", /* VARYING_SLOT_TESS_LEVEL_INNER */
"fragment.(twenty-six)", /* VARYING_SLOT_CULL_DIST0 */
"fragment.(twenty-seven)", /* VARYING_SLOT_CULL_DIST1 */
+ "fragment.(twenty-eight)", /* VARYING_SLOT_BOUNDING_BOX0 */
+ "fragment.(twenty-nine)", /* VARYING_SLOT_BOUNDING_BOX1 */
"fragment.varying[0]",
"fragment.varying[1]",
"fragment.varying[2]",
"result.(twenty-five)", /* VARYING_SLOT_TESS_LEVEL_INNER */
"result.(twenty-six)", /* VARYING_SLOT_CULL_DIST0 */
"result.(twenty-seven)", /* VARYING_SLOT_CULL_DIST1 */
+ "result.(twenty-eight)", /* VARYING_SLOT_BOUNDING_BOX0 */
+ "result.(twenty-nine)", /* VARYING_SLOT_BOUNDING_BOX1 */
"result.varying[0]",
"result.varying[1]",
"result.varying[2]",