aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.c')
-rw-r--r--src/core/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/core.c b/src/core/core.c
index 90038c6..e1671ea 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -420,6 +420,10 @@ void gfx_destroy_shader_program(GfxCore* gfxcore, ShaderProgram** prog) {
420 // Remove the shader program from the cache. 420 // Remove the shader program from the cache.
421 ProgramCache* cache = &gfxcore->program_cache; 421 ProgramCache* cache = &gfxcore->program_cache;
422 ShaderProgramCacheEntry* entry = find_program_cache_entry(cache, *prog); 422 ShaderProgramCacheEntry* entry = find_program_cache_entry(cache, *prog);
423 // TODO: The following assertion is too restrictive. Clients can end up
424 // re-using the same shader by virtue of the cache. The assertion assumes
425 // that no two "different" clients use the same set of shaders. This can
426 // be relaxed by reference-counting the shaders in the cache.
423 assert(entry); // Must be there, shaders can't go untracked. 427 assert(entry); // Must be there, shaders can't go untracked.
424 mempool_free(cache, &entry); 428 mempool_free(cache, &entry);
425 429