/**
* Get a pipe_sampler_view object from a texture unit.
*/
-GLboolean
+void
st_update_single_texture(struct st_context *st,
struct pipe_sampler_view **sampler_view,
GLuint texUnit, unsigned glsl_version)
retval = st_finalize_texture(ctx, st->pipe, texObj, 0);
if (!retval) {
/* out of mem */
- return GL_FALSE;
+ *sampler_view = NULL;
+ return;
}
/* Check a few pieces of state outside the texture object to see if we
*sampler_view =
st_get_texture_sampler_view_from_stobj(st, stObj, samp, glsl_version);
- return GL_TRUE;
}
/* prog->sh.data is NULL if it's ARB_fragment_program */
unsigned glsl_version = prog->sh.data ? prog->sh.data->Version : 0;
const GLuint texUnit = prog->SamplerUnits[unit];
- GLboolean retval;
-
- retval = st_update_single_texture(st, &sampler_view, texUnit,
- glsl_version);
- if (retval == GL_FALSE)
- continue;
+ st_update_single_texture(st, &sampler_view, texUnit, glsl_version);
num_textures = unit + 1;
}
struct pipe_sampler_view *view;
struct pipe_sampler_state sampler = {0};
- if (!st_update_single_texture(st, &view, texUnit, prog->sh.data->Version))
+ st_update_single_texture(st, &view, texUnit, prog->sh.data->Version);
+ if (!view)
return 0;
if (view->target != PIPE_BUFFER)
struct pipe_sampler_state *sampler,
GLuint texUnit);
-GLboolean
+void
st_update_single_texture(struct st_context *st,
struct pipe_sampler_view **sampler_view,
GLuint texUnit, unsigned glsl_version);