Re: [PATCH 4/8] wined3d: Simplify FBO cleanup on resource destruction.
On 14 February 2016 at 21:33, Stefan Dösinger <stefandoesinger(a)gmx.at> wrote:
@@ -65,18 +66,21 @@ static void surface_cleanup(struct wined3d_surface *surface) if (surface->rb_multisample) { TRACE("Deleting multisample renderbuffer %u.\n", surface->rb_multisample); + context_gl_resource_released(device, surface->rb_multisample, TRUE); gl_info->fbo_ops.glDeleteRenderbuffers(1, &surface->rb_multisample); I'm not sure it would necessarily be much better, but one alternative would be to make the context do the deletion.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Am 2016-02-16 um 14:04 schrieb Henri Verbeet:
I'm not sure it would necessarily be much better, but one alternative would be to make the context do the deletion. I am not sure what you mean. Do you mean moving the glDeleteRenderbuffers or glDeleteTextures call into context_gl_resource_released and renaming it to something like context_destroy_gl_resource? If that's what you mean I'm open to either option.
I guess we could also get rid of the entire fbo_destroy_list code and let the FBOs be reused eventually or destroyed when the context goes away, but that'll mean we'll keep a non-trivial number of GL resources around for possibly a long time. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWyf42AAoJEN0/YqbEcdMw6ucP/2iWLIem+yXdfxk0EsjrPX0p 16kp/x8mpvtv75oHdV0loPd/CXRMgwnfKxOWGJnyIweOD128IW+Ro/IaZPc9HB2D IHhhpmJF8gE1hIVMqV6HRlEuySWOHZcY+JoxqhxywkBjSWqVEOJ6loQdR6khPEo2 D7YSqsXFRGrDnNoH+A9UARdBUUiXsHHVhJqR3dkhx6CaGDnovVPiy8Pi1lOiXQ5C ChSIN0GZXnaupxE/JwzENjEKOGLryjx5946KH8bFpmOxg2JMXrxXTrBFgPzZa0F6 WjZMNjbUtFGTcT99/YcsqO8Z3Zpg1JvuqFTpH3gOogcBJ08JPzh0rh96+yWqUuyQ VH0bTUlXUzJeDcHdVZEM31+QC77O2tUbA3n376TITkQF/X6TX2Qjjy+bF6etCH5r xXDUKlgwoOBKUTzInqX62SUPeZ4/V9SUhBOTDv+cgpqeEz1na+x4alkIhVaJlWT0 GZ/J5uGwjibazX7EYGd0B+Sb0iR8givCufSs9meV4BHTLqxlOs/fyAh+HvDePAN2 PjYoC1HbulT1eLDzw50xL3Roaleh35Q0ohkj07ef9myelXdgmEq2prAy1RWYwmpP egBl1ujYzYRR3pYalfwiumaRbDahEa0/6YGlxE5bijjAACSxmE6EbALr4uzWGd4J CdiH7FxwinOGfPuJwZn5 =uuB7 -----END PGP SIGNATURE-----
On 21 February 2016 at 19:13, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
Am 2016-02-16 um 14:04 schrieb Henri Verbeet:
I'm not sure it would necessarily be much better, but one alternative would be to make the context do the deletion. I am not sure what you mean. Do you mean moving the glDeleteRenderbuffers or glDeleteTextures call into context_gl_resource_released and renaming it to something like context_destroy_gl_resource? If that's what you mean I'm open to either option.
Something like that, yeah, or just context_destroy_renderbuffer() and context_destroy_texture(). Similar to things like context_destroy_fbo(), context_bind_texture(), etc.
participants (2)
-
Henri Verbeet -
Stefan Dösinger