mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: Attempt to pair up Driver.RenderTexture and FinishRenderTexture()
This is probably not 100% complete (bind vs unbind may still not pair up exactly), but it should help out drivers which are relying on FinishRenderTexture to be called when we're done rendering to a particular texture level, not just when we're done rendering to the object at all. This is the case for the one consumer of FinishRenderTexture() so far: the gallium state tracker. Noticed when trying to make use of FRT() in the intel driver.
This commit is contained in:
parent
8df81bca17
commit
6b68482e68
1 changed files with 4 additions and 0 deletions
|
|
@ -233,9 +233,13 @@ _mesa_set_texture_attachment(GLcontext *ctx,
|
|||
if (att->Texture == texObj) {
|
||||
/* re-attaching same texture */
|
||||
ASSERT(att->Type == GL_TEXTURE);
|
||||
if (ctx->Driver.FinishRenderTexture)
|
||||
ctx->Driver.FinishRenderTexture(ctx, att);
|
||||
}
|
||||
else {
|
||||
/* new attachment */
|
||||
if (ctx->Driver.FinishRenderTexture && att->Texture)
|
||||
ctx->Driver.FinishRenderTexture(ctx, att);
|
||||
_mesa_remove_attachment(ctx, att);
|
||||
att->Type = GL_TEXTURE;
|
||||
assert(!att->Texture);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue