gallium: use cso_save/restore_sampler_textures() functions
This commit is contained in:
@@ -444,6 +444,7 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
|
|
||||||
cso_save_rasterizer(cso);
|
cso_save_rasterizer(cso);
|
||||||
cso_save_samplers(cso);
|
cso_save_samplers(cso);
|
||||||
|
cso_save_sampler_textures(cso);
|
||||||
cso_save_viewport(cso);
|
cso_save_viewport(cso);
|
||||||
|
|
||||||
/* rasterizer state: just scissor */
|
/* rasterizer state: just scissor */
|
||||||
@@ -493,12 +494,11 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
/* restore state */
|
/* restore state */
|
||||||
cso_restore_rasterizer(cso);
|
cso_restore_rasterizer(cso);
|
||||||
cso_restore_samplers(cso);
|
cso_restore_samplers(cso);
|
||||||
|
cso_restore_sampler_textures(cso);
|
||||||
cso_restore_viewport(cso);
|
cso_restore_viewport(cso);
|
||||||
/* shaders don't go through cso yet */
|
/* shaders don't go through cso yet */
|
||||||
pipe->bind_fs_state(pipe, st->fp->driver_shader);
|
pipe->bind_fs_state(pipe, st->fp->driver_shader);
|
||||||
pipe->bind_vs_state(pipe, st->vp->driver_shader);
|
pipe->bind_vs_state(pipe, st->vp->driver_shader);
|
||||||
pipe->set_sampler_textures(pipe, ctx->st->state.num_textures,
|
|
||||||
ctx->st->state.sampler_texture);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -530,14 +530,13 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
cso_save_rasterizer(cso);
|
cso_save_rasterizer(cso);
|
||||||
cso_save_viewport(cso);
|
cso_save_viewport(cso);
|
||||||
cso_save_samplers(cso);
|
cso_save_samplers(cso);
|
||||||
|
cso_save_sampler_textures(cso);
|
||||||
|
|
||||||
/* rasterizer state: just scissor */
|
/* rasterizer state: just scissor */
|
||||||
{
|
{
|
||||||
struct pipe_rasterizer_state rasterizer;
|
struct pipe_rasterizer_state rasterizer;
|
||||||
memset(&rasterizer, 0, sizeof(rasterizer));
|
memset(&rasterizer, 0, sizeof(rasterizer));
|
||||||
if (ctx->Scissor.Enabled)
|
rasterizer.scissor = ctx->Scissor.Enabled;
|
||||||
rasterizer.scissor = 1;
|
|
||||||
|
|
||||||
cso_set_rasterizer(cso, &rasterizer);
|
cso_set_rasterizer(cso, &rasterizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -581,9 +580,7 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* texture state: */
|
/* texture state: */
|
||||||
{
|
|
||||||
pipe->set_sampler_textures(pipe, 1, &pt);
|
pipe->set_sampler_textures(pipe, 1, &pt);
|
||||||
}
|
|
||||||
|
|
||||||
/* Compute window coords (y=0=bottom) with pixel zoom.
|
/* Compute window coords (y=0=bottom) with pixel zoom.
|
||||||
* Recall that these coords are transformed by the current
|
* Recall that these coords are transformed by the current
|
||||||
@@ -604,12 +601,11 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
cso_restore_rasterizer(cso);
|
cso_restore_rasterizer(cso);
|
||||||
cso_restore_viewport(cso);
|
cso_restore_viewport(cso);
|
||||||
cso_restore_samplers(cso);
|
cso_restore_samplers(cso);
|
||||||
|
cso_restore_sampler_textures(cso);
|
||||||
|
|
||||||
/* shaders don't go through cso yet */
|
/* shaders don't go through cso yet */
|
||||||
pipe->bind_fs_state(pipe, st->fp->driver_shader);
|
pipe->bind_fs_state(pipe, st->fp->driver_shader);
|
||||||
pipe->bind_vs_state(pipe, st->vp->driver_shader);
|
pipe->bind_vs_state(pipe, st->vp->driver_shader);
|
||||||
|
|
||||||
pipe->set_sampler_textures(pipe, ctx->st->state.num_textures,
|
|
||||||
ctx->st->state.sampler_texture);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user