diff options
author | Marek Olšák <[email protected]> | 2017-06-20 21:32:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | 9c499e6759b26c5e9c5a16e306624adee4bca8d6 (patch) | |
tree | 9a12016f7e9e43e80b6f9ca142b97a67fc8952a6 | |
parent | c0ed52f6146c7e24e1275451773bd47c1eda3145 (diff) |
st/mesa: don't invoke st_finalize_texture & st_convert_sampler for TBOs
This is a v2 of the previous patch (v1 didn't skip st_finalize_texture).
Reviewed-by: Samuel Pitoiset <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 677e5c40758..317bb5324d0 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -2916,12 +2916,14 @@ st_NewTextureHandle(struct gl_context *ctx, struct gl_texture_object *texObj, struct st_texture_object *stObj = st_texture_object(texObj); struct pipe_context *pipe = st->pipe; struct pipe_sampler_view *view; - struct pipe_sampler_state sampler; + struct pipe_sampler_state sampler = {0}; - if (!st_finalize_texture(ctx, pipe, texObj, 0)) - return 0; + if (texObj->Target != GL_TEXTURE_BUFFER) { + if (!st_finalize_texture(ctx, pipe, texObj, 0)) + return 0; - st_convert_sampler(st, texObj, sampObj, &sampler); + st_convert_sampler(st, texObj, sampObj, &sampler); + } view = st_get_texture_sampler_view_from_stobj(st, stObj, sampObj, 0); |