mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
st/mesa: read Target only once in st_update_single_texture
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11428>
This commit is contained in:
parent
fc9d1660b7
commit
c7f860b6de
1 changed files with 3 additions and 2 deletions
|
|
@ -69,8 +69,9 @@ st_update_single_texture(struct st_context *st,
|
|||
assert(texObj);
|
||||
|
||||
stObj = st_texture_object(texObj);
|
||||
GLenum target = texObj->Target;
|
||||
|
||||
if (unlikely(texObj->Target == GL_TEXTURE_BUFFER)) {
|
||||
if (unlikely(target == GL_TEXTURE_BUFFER)) {
|
||||
*sampler_view = st_get_buffer_sampler_view_from_stobj(st, stObj);
|
||||
return;
|
||||
}
|
||||
|
|
@ -82,7 +83,7 @@ st_update_single_texture(struct st_context *st,
|
|||
return;
|
||||
}
|
||||
|
||||
if (texObj->TargetIndex == TEXTURE_EXTERNAL_INDEX &&
|
||||
if (target == GL_TEXTURE_EXTERNAL_OES &&
|
||||
stObj->pt->screen->resource_changed)
|
||||
stObj->pt->screen->resource_changed(stObj->pt->screen, stObj->pt);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue