st->vp = stvp;
st->fp = stfp;
- st->pipe->bind_vs_state(st->pipe, stvp->driver_shader);
- st->pipe->bind_fs_state(st->pipe, stfp->driver_shader);
+ cso_set_vertex_shader(st->cso_context, stvp->driver_shader);
+ cso_set_fragment_shader(st->cso_context, stfp->driver_shader);
st->vertex_result_to_slot = xvp->output_to_slot;
}
cso_save_samplers(cso);
cso_save_sampler_textures(cso);
cso_save_viewport(cso);
+ cso_save_fragment_shader(cso);
+ cso_save_vertex_shader(cso);
/* rasterizer state: just scissor */
st->bitmap.rasterizer.scissor = ctx->Scissor.Enabled;
cso_set_rasterizer(cso, &st->bitmap.rasterizer);
/* fragment shader state: TEX lookup program */
- pipe->bind_fs_state(pipe, stfp->driver_shader);
+ cso_set_fragment_shader(cso, stfp->driver_shader);
/* vertex shader state: position + texcoord pass-through */
- pipe->bind_vs_state(pipe, st->bitmap.vs);
+ cso_set_vertex_shader(cso, st->bitmap.vs);
/* sampler / texture state */
cso_single_sampler(cso, 0, &st->bitmap.sampler);
cso_restore_samplers(cso);
cso_restore_sampler_textures(cso);
cso_restore_viewport(cso);
- /* shaders don't go through cso yet */
- pipe->bind_fs_state(pipe, st->fp->driver_shader);
- pipe->bind_vs_state(pipe, st->vp->driver_shader);
+ cso_save_fragment_shader(cso);
+ cso_save_vertex_shader(cso);
}
GLbitfield mask, GLenum filter)
{
struct st_context *st = ctx->st;
- struct pipe_context *pipe = st->pipe;
const uint pFilter = ((filter == GL_NEAREST)
? PIPE_TEX_MIPFILTER_NEAREST
0.0, pFilter);
}
-
- /* shaders don't go through CSO yet */
- pipe->bind_fs_state(pipe, st->fp->driver_shader);
- pipe->bind_vs_state(pipe, st->vp->driver_shader);
}
GLboolean color, GLboolean depth, GLboolean stencil)
{
struct st_context *st = ctx->st;
- struct pipe_context *pipe = st->pipe;
const GLfloat x0 = ctx->DrawBuffer->_Xmin;
const GLfloat x1 = ctx->DrawBuffer->_Xmax;
GLfloat y0, y1;
cso_save_depth_stencil_alpha(st->cso_context);
cso_save_rasterizer(st->cso_context);
cso_save_viewport(st->cso_context);
+ cso_save_fragment_shader(st->cso_context);
+ cso_save_vertex_shader(st->cso_context);
/* blend state: RGBA masking */
{
cso_set_rasterizer(st->cso_context, &st->clear.raster);
cso_set_viewport(st->cso_context, &st->clear.viewport);
- pipe->bind_fs_state(pipe, st->clear.fs);
- pipe->bind_vs_state(pipe, st->clear.vs);
+ cso_set_fragment_shader(st->cso_context, st->clear.fs);
+ cso_set_vertex_shader(st->cso_context, st->clear.vs);
/* draw quad matching scissor rect (XXX verify coord round-off) */
draw_quad(ctx, x0, y0, x1, y1, ctx->Depth.Clear, ctx->Color.ClearColor);
cso_restore_depth_stencil_alpha(st->cso_context);
cso_restore_rasterizer(st->cso_context);
cso_restore_viewport(st->cso_context);
- /* these don't go through cso yet */
- pipe->bind_fs_state(pipe, st->fp->driver_shader);
- pipe->bind_vs_state(pipe, st->vp->driver_shader);
+ cso_restore_fragment_shader(st->cso_context);
+ cso_restore_vertex_shader(st->cso_context);
}
cso_save_viewport(cso);
cso_save_samplers(cso);
cso_save_sampler_textures(cso);
+ cso_save_fragment_shader(cso);
+ cso_save_vertex_shader(cso);
/* rasterizer state: just scissor */
{
}
/* fragment shader state: TEX lookup program */
- pipe->bind_fs_state(pipe, stfp->driver_shader);
+ cso_set_fragment_shader(cso, stfp->driver_shader);
/* vertex shader state: position + texcoord pass-through */
- pipe->bind_vs_state(pipe, stvp->driver_shader);
+ cso_set_vertex_shader(cso, stvp->driver_shader);
/* texture sampling state: */
cso_restore_viewport(cso);
cso_restore_samplers(cso);
cso_restore_sampler_textures(cso);
-
- /* shaders don't go through cso yet */
- pipe->bind_fs_state(pipe, st->fp->driver_shader);
- pipe->bind_vs_state(pipe, st->vp->driver_shader);
+ cso_restore_fragment_shader(cso);
+ cso_restore_vertex_shader(cso);
}
util_gen_mipmap(st->gen_mipmap, pt, face, baseLevel, lastLevel,
PIPE_TEX_FILTER_LINEAR);
- /* shaders don't go through CSO yet */
- if (st->fp)
- pipe->bind_fs_state(pipe, st->fp->driver_shader);
- if (st->vp)
- pipe->bind_vs_state(pipe, st->vp->driver_shader);
-
return TRUE;
}