aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index c26058874..3c17bd6c3 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -454,8 +454,8 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
assert(height <= (GLsizei)maxSize);
cso_save_rasterizer(cso);
- cso_save_samplers(cso);
- cso_save_fragment_sampler_views(cso);
+ cso_save_samplers(cso, PIPE_SHADER_FRAGMENT);
+ cso_save_sampler_views(cso, PIPE_SHADER_FRAGMENT);
cso_save_viewport(cso);
cso_save_fragment_shader(cso);
cso_save_stream_outputs(cso);
@@ -480,23 +480,26 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* user samplers, plus our bitmap sampler */
{
struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
- uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_samplers);
+ uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_fragment_samplers);
uint i;
- for (i = 0; i < st->state.num_samplers; i++) {
- samplers[i] = &st->state.samplers[i];
+ for (i = 0; i < st->state.num_fragment_samplers; i++) {
+ samplers[i] = &st->state.fragment_samplers[i];
}
samplers[fpv->bitmap_sampler] =
&st->bitmap.samplers[sv->texture->target != PIPE_TEXTURE_RECT];
- cso_set_samplers(cso, num, (const struct pipe_sampler_state **) samplers);
+ cso_set_samplers(cso, PIPE_SHADER_FRAGMENT, num,
+ (const struct pipe_sampler_state **) samplers);
}
/* user textures, plus the bitmap texture */
{
struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
- uint num = MAX2(fpv->bitmap_sampler + 1, st->state.num_textures);
- memcpy(sampler_views, st->state.sampler_views, sizeof(sampler_views));
+ uint num = MAX2(fpv->bitmap_sampler + 1,
+ st->state.num_fragment_textures);
+ memcpy(sampler_views, st->state.fragment_sampler_views,
+ sizeof(sampler_views));
sampler_views[fpv->bitmap_sampler] = sv;
- cso_set_fragment_sampler_views(cso, num, sampler_views);
+ cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, num, sampler_views);
}
/* viewport state: viewport matching window dims */
@@ -535,8 +538,8 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
/* restore state */
cso_restore_rasterizer(cso);
- cso_restore_samplers(cso);
- cso_restore_fragment_sampler_views(cso);
+ cso_restore_samplers(cso, PIPE_SHADER_FRAGMENT);
+ cso_restore_sampler_views(cso, PIPE_SHADER_FRAGMENT);
cso_restore_viewport(cso);
cso_restore_fragment_shader(cso);
cso_restore_vertex_shader(cso);