mesa: Don't bind DRAW/READ_FRAMEBUFFER separately without FBO blit support
[mesa.git] / src / gallium / auxiliary / sct / usage.c
1 /* surface / context tracking */
2
3
4 /*
5
6 context A:
7 render to texture T
8
9 context B:
10 texture from T
11
12 -----------------------
13
14 flush surface:
15 which contexts are bound to the surface?
16
17 -----------------------
18
19 glTexSubImage():
20 which contexts need to be flushed?
21
22 */
23
24
25 /*
26
27 in MakeCurrent():
28
29 call sct_bind_surfaces(context, list of surfaces) to update the
30 dependencies between context and surfaces
31
32
33 in SurfaceFlush(), or whatever it is in D3D:
34
35 call sct_get_surface_contexts(surface) to get a list of contexts
36 which are currently bound to the surface.
37
38
39
40 in BindTexture():
41
42 call sct_bind_texture(context, texture) to indicate that the texture
43 is used in the scene.
44
45
46 in glTexSubImage() or RenderToTexture():
47
48 call sct_is_texture_used(context, texture) to determine if the texture
49 has been used in the scene, but the scene's not flushed. If TRUE is
50 returned it means the scene has to be rendered/flushed before the contents
51 of the texture can be changed.
52
53
54 in psb_scene_flush/terminate():
55
56 call sct_flush_textures(context) to tell the SCT that the textures which
57 were used in the scene can be released.
58
59
60
61 */