Lines Matching refs:prog
73 compile_shaders(struct gl_context *ctx, struct gl_shader_program *prog) { in compile_shaders() argument
74 for (unsigned i = 0; i < prog->NumShaders; i++) { in compile_shaders()
75 _mesa_glsl_compile_shader(ctx, prog->Shaders[i], false, false, true); in compile_shaders()
88 struct gl_shader_program *prog) in shader_cache_write_program_metadata() argument
100 static const char zero[sizeof(prog->data->sha1)] = {0}; in shader_cache_write_program_metadata()
101 if (memcmp(prog->data->sha1, zero, sizeof(prog->data->sha1)) == 0) in shader_cache_write_program_metadata()
109 struct gl_linked_shader *sh = prog->_LinkedShaders[i]; in shader_cache_write_program_metadata()
115 serialize_glsl_program(&metadata, ctx, prog); in shader_cache_write_program_metadata()
120 (cache_key *) malloc(prog->NumShaders * sizeof(cache_key)); in shader_cache_write_program_metadata()
121 cache_item_metadata.num_keys = prog->NumShaders; in shader_cache_write_program_metadata()
126 for (unsigned i = 0; i < prog->NumShaders; i++) { in shader_cache_write_program_metadata()
127 memcpy(cache_item_metadata.keys[i], prog->Shaders[i]->disk_cache_sha1, in shader_cache_write_program_metadata()
131 disk_cache_put(cache, prog->data->sha1, metadata.data, metadata.size, in shader_cache_write_program_metadata()
136 _mesa_sha1_format(sha1_buf, prog->data->sha1); in shader_cache_write_program_metadata()
147 struct gl_shader_program *prog) in shader_cache_read_program_metadata() argument
152 if (prog->Name == 0 || prog->data->spirv) in shader_cache_read_program_metadata()
163 prog->AttributeBindings->iterate(create_binding_str, &buf); in shader_cache_read_program_metadata()
165 prog->FragDataBindings->iterate(create_binding_str, &buf); in shader_cache_read_program_metadata()
167 prog->FragDataIndexBindings->iterate(create_binding_str, &buf); in shader_cache_read_program_metadata()
168 ralloc_asprintf_append(&buf, "tf: %d ", prog->TransformFeedback.BufferMode); in shader_cache_read_program_metadata()
169 for (unsigned int i = 0; i < prog->TransformFeedback.NumVarying; i++) { in shader_cache_read_program_metadata()
171 prog->TransformFeedback.VaryingNames[i]); in shader_cache_read_program_metadata()
178 prog->SeparateShader ? "T" : "F"); in shader_cache_read_program_metadata()
205 for (unsigned i = 0; i < prog->NumShaders; i++) { in shader_cache_read_program_metadata()
206 struct gl_shader *sh = prog->Shaders[i]; in shader_cache_read_program_metadata()
211 disk_cache_compute_key(cache, buf, strlen(buf), prog->data->sha1); in shader_cache_read_program_metadata()
215 uint8_t *buffer = (uint8_t *) disk_cache_get(cache, prog->data->sha1, in shader_cache_read_program_metadata()
228 compile_shaders(ctx, prog); in shader_cache_read_program_metadata()
233 _mesa_sha1_format(sha1buf, prog->data->sha1); in shader_cache_read_program_metadata()
241 bool deserialized = deserialize_glsl_program(&metadata, ctx, prog); in shader_cache_read_program_metadata()
254 disk_cache_remove(cache, prog->data->sha1); in shader_cache_read_program_metadata()
255 compile_shaders(ctx, prog); in shader_cache_read_program_metadata()
261 prog->data->LinkStatus = LINKING_SKIPPED; in shader_cache_read_program_metadata()