nir/conditional_if: Properly use the builder
[mesa.git] / src / compiler / nir / nir_lower_drawpixels.c
index 54f3ea08aadb01134cb3e375861f5274690a2ff7..51c52d038c7e6f0b3e9f63fd156cf8044de729ff 100644 (file)
@@ -134,6 +134,7 @@ lower_color(lower_drawpixels_state *state, nir_intrinsic_instr *intr)
    tex->sampler_index = state->options->drawpix_sampler;
    tex->texture_index = state->options->drawpix_sampler;
    tex->dest_type = nir_type_float;
+   tex->src[0].src_type = nir_tex_src_coord;
    tex->src[0].src = nir_src_for_ssa(texcoord);
 
    nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
@@ -161,6 +162,7 @@ lower_color(lower_drawpixels_state *state, nir_intrinsic_instr *intr)
       tex->sampler_index = state->options->pixelmap_sampler;
       tex->texture_index = state->options->pixelmap_sampler;
       tex->dest_type = nir_type_float;
+      tex->src[0].src_type = nir_tex_src_coord;
       tex->src[0].src = nir_src_for_ssa(nir_swizzle(b, def, swiz_xy, 2, true));
 
       nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);
@@ -174,6 +176,7 @@ lower_color(lower_drawpixels_state *state, nir_intrinsic_instr *intr)
       tex->coord_components = 2;
       tex->sampler_index = state->options->pixelmap_sampler;
       tex->dest_type = nir_type_float;
+      tex->src[0].src_type = nir_tex_src_coord;
       tex->src[0].src = nir_src_for_ssa(nir_swizzle(b, def, swiz_zw, 2, true));
 
       nir_ssa_dest_init(&tex->instr, &tex->dest, 4, 32, NULL);