Lines Matching refs:prog
43 _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) in _mesa_glsl_link_shader() argument
48 _mesa_clear_shader_program_data(ctx, prog); in _mesa_glsl_link_shader()
50 prog->data = _mesa_create_shader_program_data(); in _mesa_glsl_link_shader()
52 prog->data->LinkStatus = LINKING_SUCCESS; in _mesa_glsl_link_shader()
54 for (i = 0; i < prog->NumShaders; i++) { in _mesa_glsl_link_shader()
55 if (!prog->Shaders[i]->CompileStatus) { in _mesa_glsl_link_shader()
56 linker_error(prog, "linking with uncompiled/unspecialized shader"); in _mesa_glsl_link_shader()
60 spirv = (prog->Shaders[i]->spirv_data != NULL); in _mesa_glsl_link_shader()
61 } else if (spirv && !prog->Shaders[i]->spirv_data) { in _mesa_glsl_link_shader()
68 linker_error(prog, in _mesa_glsl_link_shader()
73 prog->data->spirv = spirv; in _mesa_glsl_link_shader()
75 if (prog->data->LinkStatus) { in _mesa_glsl_link_shader()
77 link_shaders(ctx, prog); in _mesa_glsl_link_shader()
79 _mesa_spirv_link_shaders(ctx, prog); in _mesa_glsl_link_shader()
87 if (prog->data->LinkStatus == LINKING_SUCCESS) { in _mesa_glsl_link_shader()
88 prog->SamplersValidated = GL_TRUE; in _mesa_glsl_link_shader()
91 if (prog->data->LinkStatus && !st_link_shader(ctx, prog)) { in _mesa_glsl_link_shader()
92 prog->data->LinkStatus = LINKING_FAILURE; in _mesa_glsl_link_shader()
95 if (prog->data->LinkStatus != LINKING_FAILURE) in _mesa_glsl_link_shader()
96 _mesa_create_program_resource_hash(prog); in _mesa_glsl_link_shader()
99 if (prog->data->LinkStatus == LINKING_SKIPPED) in _mesa_glsl_link_shader()
103 if (!prog->data->LinkStatus) { in _mesa_glsl_link_shader()
104 fprintf(stderr, "GLSL shader program %d failed to link\n", prog->Name); in _mesa_glsl_link_shader()
107 if (prog->data->InfoLog && prog->data->InfoLog[0] != 0) { in _mesa_glsl_link_shader()
108 fprintf(stderr, "GLSL shader program %d info log:\n", prog->Name); in _mesa_glsl_link_shader()
109 fprintf(stderr, "%s\n", prog->data->InfoLog); in _mesa_glsl_link_shader()
114 if (prog->data->LinkStatus) in _mesa_glsl_link_shader()
115 shader_cache_write_program_metadata(ctx, prog); in _mesa_glsl_link_shader()