diff options
author | Brian <[email protected]> | 2008-03-10 17:21:43 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-10 17:22:18 -0600 |
commit | d5692cb349fb74e8f9d3a18f5bbd788b09b93581 (patch) | |
tree | af13ec8fcd074f34b6188a177bd976c4c8d04434 /src/gallium/auxiliary/sct/usage.c | |
parent | 5b82d551b7a4954b24059585fea207f3a250ec0f (diff) |
gallium: new surface/context tracker (sct) module
Will be used for tracking the surfaces and textures which are bound/used by
contexts.
Diffstat (limited to 'src/gallium/auxiliary/sct/usage.c')
-rw-r--r-- | src/gallium/auxiliary/sct/usage.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/sct/usage.c b/src/gallium/auxiliary/sct/usage.c new file mode 100644 index 00000000000..6227f199628 --- /dev/null +++ b/src/gallium/auxiliary/sct/usage.c @@ -0,0 +1,61 @@ +/* surface / context tracking */ + + +/* + +context A: + render to texture T + +context B: + texture from T + +----------------------- + +flush surface: + which contexts are bound to the surface? + +----------------------- + +glTexSubImage(): + which contexts need to be flushed? + + */ + + +/* + +in MakeCurrent(): + + call sct_bind_surfaces(context, list of surfaces) to update the + dependencies between context and surfaces + + +in SurfaceFlush(), or whatever it is in D3D: + + call sct_get_surface_contexts(surface) to get a list of contexts + which are currently bound to the surface. + + + +in BindTexture(): + + call sct_bind_texture(context, texture) to indicate that the texture + is used in the scene. + + +in glTexSubImage() or RenderToTexture(): + + call sct_is_texture_used(context, texture) to determine if the texture + has been used in the scene, but the scene's not flushed. If TRUE is + returned it means the scene has to be rendered/flushed before the contents + of the texture can be changed. + + +in psb_scene_flush/terminate(): + + call sct_flush_textures(context) to tell the SCT that the textures which + were used in the scene can be released. + + + +*/ |