"primitive modes.\n");
return;
}
- prog->TessEval.PrimitiveMode = linked_shader->TessEval.PrimitiveMode;
if (linked_shader->TessEval.Spacing == 0)
linked_shader->TessEval.Spacing = GL_EQUAL;
- prog->TessEval.Spacing = linked_shader->TessEval.Spacing;
if (linked_shader->TessEval.VertexOrder == 0)
linked_shader->TessEval.VertexOrder = GL_CCW;
- prog->TessEval.VertexOrder = linked_shader->TessEval.VertexOrder;
if (linked_shader->TessEval.PointMode == -1)
linked_shader->TessEval.PointMode = GL_FALSE;
- prog->TessEval.PointMode = linked_shader->TessEval.PointMode;
}
GLenum mode_before_gs = mode;
if (tes) {
- if (tes->TessEval.PointMode)
+ struct gl_shader *tes_sh = tes->_LinkedShaders[MESA_SHADER_TESS_EVAL];
+ if (tes_sh->TessEval.PointMode)
mode_before_gs = GL_POINTS;
- else if (tes->TessEval.PrimitiveMode == GL_ISOLINES)
+ else if (tes_sh->TessEval.PrimitiveMode == GL_ISOLINES)
mode_before_gs = GL_LINES;
else
/* the GL_QUADS mode generates triangles too */
else if (ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL]) {
struct gl_shader_program *tes =
ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL];
-
- if (tes->TessEval.PointMode)
+ struct gl_shader *tes_sh = tes->_LinkedShaders[MESA_SHADER_TESS_EVAL];
+ if (tes_sh->TessEval.PointMode)
pass = ctx->TransformFeedback.Mode == GL_POINTS;
- else if (tes->TessEval.PrimitiveMode == GL_ISOLINES)
+ else if (tes_sh->TessEval.PrimitiveMode == GL_ISOLINES)
pass = ctx->TransformFeedback.Mode == GL_LINES;
else
pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
case GL_TESS_GEN_MODE:
if (!has_tess)
break;
- if (check_tes_query(ctx, shProg))
- *params = shProg->TessEval.PrimitiveMode;
+ if (check_tes_query(ctx, shProg)) {
+ *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
+ TessEval.PrimitiveMode;
+ }
return;
case GL_TESS_GEN_SPACING:
if (!has_tess)
break;
- if (check_tes_query(ctx, shProg))
- *params = shProg->TessEval.Spacing;
+ if (check_tes_query(ctx, shProg)) {
+ *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
+ TessEval.Spacing;
+ }
return;
case GL_TESS_GEN_VERTEX_ORDER:
if (!has_tess)
break;
- if (check_tes_query(ctx, shProg))
- *params = shProg->TessEval.VertexOrder;
+ if (check_tes_query(ctx, shProg)) {
+ *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
+ TessEval.VertexOrder;
+ }
return;
case GL_TESS_GEN_POINT_MODE:
if (!has_tess)
break;
- if (check_tes_query(ctx, shProg))
- *params = shProg->TessEval.PointMode;
+ if (check_tes_query(ctx, shProg)) {
+ *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
+ TessEval.PointMode;
+ }
return;
default:
break;
case MESA_SHADER_TESS_EVAL: {
struct gl_tess_eval_program *dst_tep =
(struct gl_tess_eval_program *) dst;
- dst_tep->PrimitiveMode = src->TessEval.PrimitiveMode;
- dst_tep->Spacing = src->TessEval.Spacing;
- dst_tep->VertexOrder = src->TessEval.VertexOrder;
- dst_tep->PointMode = src->TessEval.PointMode;
+ struct gl_shader *tes_sh = src->_LinkedShaders[MESA_SHADER_TESS_EVAL];
+
+ dst_tep->PrimitiveMode = tes_sh->TessEval.PrimitiveMode;
+ dst_tep->Spacing = tes_sh->TessEval.Spacing;
+ dst_tep->VertexOrder = tes_sh->TessEval.VertexOrder;
+ dst_tep->PointMode = tes_sh->TessEval.PointMode;
dst->ClipDistanceArraySize = src->TessEval.ClipDistanceArraySize;
dst->CullDistanceArraySize = src->TessEval.CullDistanceArraySize;
break;