Lines Matching refs:tex

38    nir_variable *texcoord, *texcoord_const, *scale, *bias, *tex, *pixelmap;
120 nir_tex_instr *tex;
132 if (!state->tex) {
133 state->tex =
135 state->tex->data.binding = state->options->drawpix_sampler;
136 state->tex->data.explicit_binding = true;
137 state->tex->data.how_declared = nir_var_hidden;
140 nir_deref_instr *tex_deref = nir_build_deref_var(b, state->tex);
145 tex = nir_tex_instr_create(state->shader, 3);
146 tex->op = nir_texop_tex;
147 tex->sampler_dim = GLSL_SAMPLER_DIM_2D;
148 tex->coord_components = 2;
149 tex->dest_type = nir_type_float32;
150 tex->src[0].src_type = nir_tex_src_texture_deref;
151 tex->src[0].src = nir_src_for_ssa(&tex_deref->dest.ssa);
152 tex->src[1].src_type = nir_tex_src_sampler_deref;
153 tex->src[1].src = nir_src_for_ssa(&tex_deref->dest.ssa);
154 tex->src[2].src_type = nir_tex_src_coord;
155 tex->src[2].src =
157 (1 << tex->coord_components) - 1));
159 nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
160 nir_builder_instr_insert(b, &tex->instr);
161 def = &tex->dest.ssa;
185 tex = nir_tex_instr_create(state->shader, 3);
186 tex->op = nir_texop_tex;
187 tex->sampler_dim = GLSL_SAMPLER_DIM_2D;
188 tex->coord_components = 2;
189 tex->sampler_index = state->options->pixelmap_sampler;
190 tex->texture_index = state->options->pixelmap_sampler;
191 tex->dest_type = nir_type_float32;
192 tex->src[0].src_type = nir_tex_src_texture_deref;
193 tex->src[0].src = nir_src_for_ssa(&pixelmap_deref->dest.ssa);
194 tex->src[1].src_type = nir_tex_src_sampler_deref;
195 tex->src[1].src = nir_src_for_ssa(&pixelmap_deref->dest.ssa);
196 tex->src[2].src_type = nir_tex_src_coord;
197 tex->src[2].src = nir_src_for_ssa(nir_channels(b, def, 0x3));
199 nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
200 nir_builder_instr_insert(b, &tex->instr);
201 def_xy = &tex->dest.ssa;
204 tex = nir_tex_instr_create(state->shader, 1);
205 tex->op = nir_texop_tex;
206 tex->sampler_dim = GLSL_SAMPLER_DIM_2D;
207 tex->coord_components = 2;
208 tex->sampler_index = state->options->pixelmap_sampler;
209 tex->dest_type = nir_type_float32;
210 tex->src[0].src_type = nir_tex_src_coord;
211 tex->src[0].src = nir_src_for_ssa(nir_channels(b, def, 0xc));
213 nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
214 nir_builder_instr_insert(b, &tex->instr);
215 def_zw = &tex->dest.ssa;