_mesa_HashLockMutex(ctx->Shared->ShaderObjects);
name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
- sh = _mesa_new_shader(ctx, name, _mesa_shader_enum_to_shader_stage(type));
+ sh = _mesa_new_shader(name, _mesa_shader_enum_to_shader_stage(type));
sh->Type = type;
_mesa_HashInsertLocked(ctx->Shared->ShaderObjects, name, sh);
_mesa_HashUnlockMutex(ctx->Shared->ShaderObjects);
break;
if (check_gs_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->
- Geom.VerticesOut;
+ info.Geom.VerticesOut;
}
return;
case GL_GEOMETRY_SHADER_INVOCATIONS:
break;
if (check_gs_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->
- Geom.Invocations;
+ info.Geom.Invocations;
}
return;
case GL_GEOMETRY_INPUT_TYPE:
break;
if (check_gs_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->
- Geom.InputType;
+ info.Geom.InputType;
}
return;
case GL_GEOMETRY_OUTPUT_TYPE:
break;
if (check_gs_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]->
- Geom.OutputType;
+ info.Geom.OutputType;
}
return;
case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: {
break;
if (check_tcs_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_TESS_CTRL]->
- TessCtrl.VerticesOut;
+ info.TessCtrl.VerticesOut;
}
return;
case GL_TESS_GEN_MODE:
break;
if (check_tes_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
- TessEval.PrimitiveMode;
+ info.TessEval.PrimitiveMode;
}
return;
case GL_TESS_GEN_SPACING:
break;
if (check_tes_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
- TessEval.Spacing;
+ info.TessEval.Spacing;
}
return;
case GL_TESS_GEN_VERTEX_ORDER:
break;
if (check_tes_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
- TessEval.VertexOrder;
+ info.TessEval.VertexOrder;
}
return;
case GL_TESS_GEN_POINT_MODE:
break;
if (check_tes_query(ctx, shProg)) {
*params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
- TessEval.PointMode;
+ info.TessEval.PointMode;
}
return;
default:
/* Capture .shader_test files. */
const char *capture_path = _mesa_get_shader_capture_path();
- if (shProg->Name != 0 && capture_path != NULL) {
+ if (shProg->Name != 0 && shProg->Name != ~0 && capture_path != NULL) {
FILE *file;
char filename[PATH_MAX];
for (i = 0; i < MESA_SHADER_STAGES; i++)
use_shader_program(ctx, i, shProg, &ctx->Shader);
_mesa_active_program(ctx, shProg, "glUseProgram");
-
- if (ctx->Driver.UseProgram)
- ctx->Driver.UseProgram(ctx, shProg);
}
{
gl_shader_stage stage = _mesa_shader_enum_to_shader_stage(type);
use_shader_program(ctx, stage, shProg, shTarget);
-
- if (ctx->Driver.UseProgram)
- ctx->Driver.UseProgram(ctx, shProg);
}
case MESA_SHADER_TESS_CTRL: {
struct gl_tess_ctrl_program *dst_tcp =
(struct gl_tess_ctrl_program *) dst;
- dst_tcp->VerticesOut =
- src->_LinkedShaders[MESA_SHADER_TESS_CTRL]->TessCtrl.VerticesOut;
+ dst_tcp->VerticesOut = src->_LinkedShaders[MESA_SHADER_TESS_CTRL]->
+ info.TessCtrl.VerticesOut;
break;
}
case MESA_SHADER_TESS_EVAL: {
struct gl_linked_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_tep->PrimitiveMode = tes_sh->info.TessEval.PrimitiveMode;
+ dst_tep->Spacing = tes_sh->info.TessEval.Spacing;
+ dst_tep->VertexOrder = tes_sh->info.TessEval.VertexOrder;
+ dst_tep->PointMode = tes_sh->info.TessEval.PointMode;
dst->ClipDistanceArraySize = src->TessEval.ClipDistanceArraySize;
dst->CullDistanceArraySize = src->TessEval.CullDistanceArraySize;
break;
src->_LinkedShaders[MESA_SHADER_GEOMETRY];
dst_gp->VerticesIn = src->Geom.VerticesIn;
- dst_gp->VerticesOut = geom_sh->Geom.VerticesOut;
- dst_gp->Invocations = geom_sh->Geom.Invocations;
- dst_gp->InputType = geom_sh->Geom.InputType;
- dst_gp->OutputType = geom_sh->Geom.OutputType;
+ dst_gp->VerticesOut = geom_sh->info.Geom.VerticesOut;
+ dst_gp->Invocations = geom_sh->info.Geom.Invocations;
+ dst_gp->InputType = geom_sh->info.Geom.InputType;
+ dst_gp->OutputType = geom_sh->info.Geom.OutputType;
dst->ClipDistanceArraySize = src->Geom.ClipDistanceArraySize;
dst->CullDistanceArraySize = src->Geom.CullDistanceArraySize;
dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;