static void
update_textures(struct st_context *st)
{
+ struct pipe_context *pipe = st->pipe;
struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current;
struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
const GLbitfield samplersUsed = (vprog->Base.SamplersUsed |
st->state.num_textures = su + 1;
- sampler_view = st_get_texture_sampler_view(stObj);
+ sampler_view = st_get_texture_sampler_view(stObj, pipe);
}
/*
return;
util_blit_pixels(st->blit,
- srcSurf, st_get_texture_sampler_view(srcObj),
+ srcSurf, st_get_texture_sampler_view(srcObj, pipe),
srcX0, srcY0, srcX1, srcY1,
dstSurf, dstX0, dstY0, dstX1, dstY1,
0.0, pFilter);
texImage->TexFormat = st_pipe_format_to_mesa_format(ps->format);
_mesa_set_fetch_functions(texImage, 2);
- stObj->pipe = ctx->st->pipe;
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stImage->pt, ps->texture);
struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *att)
{
+ struct st_context *st = ctx->st;
+ struct pipe_context *pipe = st->pipe;
struct pipe_screen *screen = ctx->st->pipe->screen;
struct st_renderbuffer *strb;
struct gl_renderbuffer *rb;
pipe_surface_reference(&strb->surface, NULL);
- pipe_sampler_view_reference(&strb->sampler_view, st_get_texture_sampler_view(stObj));
+ pipe_sampler_view_reference(&strb->sampler_view,
+ st_get_texture_sampler_view(stObj, pipe));
assert(strb->rtt_level <= strb->texture->last_level);
depth,
usage);
- stObj->pipe = st->pipe;
-
DBG("%s - success\n", __FUNCTION__);
}
struct pipe_screen *screen = pipe->screen;
struct st_texture_image *stImage = st_texture_image(texImage);
struct st_texture_object *stObj = st_texture_object(texObj);
- struct pipe_sampler_view *src_view = st_get_texture_sampler_view(stObj);
+ struct pipe_sampler_view *src_view =
+ st_get_texture_sampler_view(stObj, pipe);
const GLuint width = texImage->Width;
const GLuint height = texImage->Height;
struct pipe_surface *dst_surface;
{
struct pipe_context *pipe = st->pipe;
struct pipe_screen *screen = pipe->screen;
- struct pipe_sampler_view *psv = st_get_texture_sampler_view(stObj);
+ struct pipe_sampler_view *psv = st_get_texture_sampler_view(stObj, pipe);
const uint face = _mesa_tex_target_to_face(target);
assert(target != GL_TEXTURE_3D); /* not done yet */
_mesa_clear_texture_image(ctx, texImage);
}
- stObj->pipe = st->pipe;
pipe_resource_reference(&stImage->pt, tex);
_mesa_dirty_texobj(ctx, texObj, GL_TRUE);
#include "main/mtypes.h"
-struct pipe_context;
+
struct pipe_resource;
*/
struct pipe_sampler_view *sampler_view;
- struct pipe_context *pipe;
-
GLboolean teximage_realloc;
/* True if there is/was a surface bound to this texture object. It helps
static INLINE struct pipe_sampler_view *
-st_get_texture_sampler_view(struct st_texture_object *stObj)
+st_get_texture_sampler_view(struct st_texture_object *stObj,
+ struct pipe_context *pipe)
+
{
if (!stObj || !stObj->pt) {
return NULL;
}
if (!stObj->sampler_view) {
- stObj->sampler_view = st_create_texture_sampler_view(stObj->pipe, stObj->pt);
+ stObj->sampler_view = st_create_texture_sampler_view(pipe, stObj->pt);
}
return stObj->sampler_view;