• Home
  • Raw
  • Download

Lines Matching refs:prog

71 compile_shaders(struct gl_context *ctx, struct gl_shader_program *prog) {  in compile_shaders()  argument
72 for (unsigned i = 0; i < prog->NumShaders; i++) { in compile_shaders()
73 _mesa_glsl_compile_shader(ctx, prog->Shaders[i], false, false, true); in compile_shaders()
86 struct gl_shader_program *prog) in shader_cache_write_program_metadata() argument
98 static const char zero[sizeof(prog->data->sha1)] = {0}; in shader_cache_write_program_metadata()
99 if (memcmp(prog->data->sha1, zero, sizeof(prog->data->sha1)) == 0) in shader_cache_write_program_metadata()
105 serialize_glsl_program(&metadata, ctx, prog); in shader_cache_write_program_metadata()
110 (cache_key *) malloc(prog->NumShaders * sizeof(cache_key)); in shader_cache_write_program_metadata()
111 cache_item_metadata.num_keys = prog->NumShaders; in shader_cache_write_program_metadata()
117 for (unsigned i = 0; i < prog->NumShaders; i++) { in shader_cache_write_program_metadata()
118 disk_cache_put_key(cache, prog->Shaders[i]->sha1); in shader_cache_write_program_metadata()
119 memcpy(cache_item_metadata.keys[i], prog->Shaders[i]->sha1, in shader_cache_write_program_metadata()
122 _mesa_sha1_format(sha1_buf, prog->Shaders[i]->sha1); in shader_cache_write_program_metadata()
127 disk_cache_put(cache, prog->data->sha1, metadata.data, metadata.size, in shader_cache_write_program_metadata()
131 _mesa_sha1_format(sha1_buf, prog->data->sha1); in shader_cache_write_program_metadata()
142 struct gl_shader_program *prog) in shader_cache_read_program_metadata() argument
147 if (prog->Name == 0) in shader_cache_read_program_metadata()
158 prog->AttributeBindings->iterate(create_binding_str, &buf); in shader_cache_read_program_metadata()
160 prog->FragDataBindings->iterate(create_binding_str, &buf); in shader_cache_read_program_metadata()
162 prog->FragDataIndexBindings->iterate(create_binding_str, &buf); in shader_cache_read_program_metadata()
168 prog->SeparateShader ? "T" : "F"); in shader_cache_read_program_metadata()
195 for (unsigned i = 0; i < prog->NumShaders; i++) { in shader_cache_read_program_metadata()
196 struct gl_shader *sh = prog->Shaders[i]; in shader_cache_read_program_metadata()
201 disk_cache_compute_key(cache, buf, strlen(buf), prog->data->sha1); in shader_cache_read_program_metadata()
205 uint8_t *buffer = (uint8_t *) disk_cache_get(cache, prog->data->sha1, in shader_cache_read_program_metadata()
218 compile_shaders(ctx, prog); in shader_cache_read_program_metadata()
223 _mesa_sha1_format(sha1buf, prog->data->sha1); in shader_cache_read_program_metadata()
231 bool deserialized = deserialize_glsl_program(&metadata, ctx, prog); in shader_cache_read_program_metadata()
244 disk_cache_remove(cache, prog->data->sha1); in shader_cache_read_program_metadata()
245 compile_shaders(ctx, prog); in shader_cache_read_program_metadata()
251 prog->data->LinkStatus = linking_skipped; in shader_cache_read_program_metadata()
260 for (unsigned i = 0; i < prog->NumShaders; i++) { in shader_cache_read_program_metadata()
261 if (prog->Shaders[i]->CompileStatus == compiled_no_opts) { in shader_cache_read_program_metadata()
262 disk_cache_put_key(cache, prog->Shaders[i]->sha1); in shader_cache_read_program_metadata()
264 _mesa_sha1_format(sha1_buf, prog->Shaders[i]->sha1); in shader_cache_read_program_metadata()