mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-18 21:00:33 +01:00
st/drawpixels: move sv unref out to callers
no functional changes Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33813>
This commit is contained in:
parent
8d4a3729a3
commit
f47da0caef
1 changed files with 7 additions and 3 deletions
|
|
@ -867,9 +867,6 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
|
|||
0, false, sv);
|
||||
st->state.num_sampler_views[PIPE_SHADER_FRAGMENT] =
|
||||
MAX2(st->state.num_sampler_views[PIPE_SHADER_FRAGMENT], num_sampler_view);
|
||||
|
||||
for (unsigned i = 0; i < num_sampler_view; i++)
|
||||
pipe_sampler_view_reference(&sv[i], NULL);
|
||||
}
|
||||
|
||||
/* viewport state: viewport matching window dims */
|
||||
|
|
@ -1378,6 +1375,10 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
|
|||
ctx->Current.RasterColor,
|
||||
GL_FALSE, write_depth, write_stencil);
|
||||
|
||||
|
||||
for (unsigned i = 0; i < num_sampler_view; i++)
|
||||
pipe_sampler_view_reference(&sv[i], NULL);
|
||||
|
||||
/* free the texture (but may persist in the cache) */
|
||||
pipe_resource_reference(&pt, NULL);
|
||||
}
|
||||
|
|
@ -1904,6 +1905,9 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
|
|||
ctx->Current.Attrib[VERT_ATTRIB_COLOR0],
|
||||
invertTex, write_depth, write_stencil);
|
||||
|
||||
for (unsigned i = 0; i < num_sampler_view; i++)
|
||||
pipe_sampler_view_reference(&sv[i], NULL);
|
||||
|
||||
pipe_resource_reference(&pt, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue