Lines Matching refs:tex
51 static void bind_sampler_states(struct fd_texture_stateobj *tex, in bind_sampler_states() argument
58 tex->samplers[p] = hwcso[i]; in bind_sampler_states()
59 if (tex->samplers[p]) in bind_sampler_states()
60 tex->valid_samplers |= (1 << p); in bind_sampler_states()
62 tex->valid_samplers &= ~(1 << p); in bind_sampler_states()
65 tex->num_samplers = util_last_bit(tex->valid_samplers); in bind_sampler_states()
68 static void set_sampler_views(struct fd_texture_stateobj *tex, in set_sampler_views() argument
77 pipe_sampler_view_reference(&tex->textures[p], view); in set_sampler_views()
78 if (tex->textures[p]) { in set_sampler_views()
79 fd_resource_set_usage(tex->textures[p]->texture, FD_DIRTY_TEX); in set_sampler_views()
80 tex->valid_textures |= (1 << p); in set_sampler_views()
82 tex->valid_textures &= ~(1 << p); in set_sampler_views()
86 tex->num_textures = util_last_bit(tex->valid_textures); in set_sampler_views()
88 for (i = 0; i < tex->num_textures; i++) { in set_sampler_views()
89 uint nr_samples = fd_resource_nr_samples(tex->textures[i]->texture); in set_sampler_views()
93 tex->samples = samplers; in set_sampler_views()
103 bind_sampler_states(&ctx->tex[shader], start, nr, hwcso); in fd_sampler_states_bind()
115 set_sampler_views(&ctx->tex[shader], start, nr, views); in fd_set_sampler_views()
131 fd_setup_border_colors(struct fd_texture_stateobj *tex, void *ptr, in fd_setup_border_colors() argument
136 for (i = 0; i < tex->num_samplers; i++) { in fd_setup_border_colors()
137 struct pipe_sampler_state *sampler = tex->samplers[i]; in fd_setup_border_colors()
155 if (i < tex->num_textures && tex->textures[i]) { in fd_setup_border_colors()
157 util_format_description(tex->textures[i]->format); in fd_setup_border_colors()