diff options
author | Marek Olšák <[email protected]> | 2017-06-12 19:29:37 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | f368ea37a2cd79051abf3be46c6bb1444aa05244 (patch) | |
tree | c799bfa25ed97e1f0326093dfcaa355f5a87869e /src | |
parent | d14bb37a0a5c29793a41221be0cb8f8faa497ae0 (diff) |
st/mesa: unify fail paths for update_single_texture
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_atom_texture.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_sampler_view.c | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index cb6b4005fa6..81bf62908f1 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -64,7 +64,6 @@ st_update_single_texture(struct st_context *st, const struct gl_sampler_object *samp; struct gl_texture_object *texObj; struct st_texture_object *stObj; - GLboolean retval; samp = _mesa_get_samplerobj(ctx, texUnit); @@ -78,8 +77,8 @@ st_update_single_texture(struct st_context *st, return; } - retval = st_finalize_texture(ctx, st->pipe, texObj, 0); - if (!retval) { + if (!st_finalize_texture(ctx, st->pipe, texObj, 0) || + !stObj->pt) { /* out of mem */ *sampler_view = NULL; return; diff --git a/src/mesa/state_tracker/st_sampler_view.c b/src/mesa/state_tracker/st_sampler_view.c index 7a8d05d710a..fbf0aaeb03a 100644 --- a/src/mesa/state_tracker/st_sampler_view.c +++ b/src/mesa/state_tracker/st_sampler_view.c @@ -408,10 +408,6 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st, { struct pipe_sampler_view **sv; - if (!stObj || !stObj->pt) { - return NULL; - } - sv = st_texture_get_sampler_view(st, stObj); if (*sv) { |