Commit 9c499e67 authored by Marek Olšák's avatar Marek Olšák

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's avatarSamuel Pitoiset <>
parent c0ed52f6
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment