From: Dave Airlie <airl...@redhat.com> The bitmap lowering code references a sampler that we never declare, this fixes it by declaring the sampler. --- src/compiler/nir/nir_lower_bitmap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/src/compiler/nir/nir_lower_bitmap.c b/src/compiler/nir/nir_lower_bitmap.c index a4d9498576c..e32e1bb83c1 100644 --- a/src/compiler/nir/nir_lower_bitmap.c +++ b/src/compiler/nir/nir_lower_bitmap.c @@ -77,6 +77,17 @@ get_texcoord(nir_shader *shader) return texcoord; } +static void +add_sampler(nir_shader *shader, + const nir_lower_bitmap_options *options) +{ + nir_variable *sampler = nir_variable_create(shader, + nir_var_uniform, + glsl_sampler_type(GLSL_SAMPLER_DIM_2D, false, false, GLSL_TYPE_FLOAT), + "s_bitmap"); + sampler->data.location = options->sampler; +} + static void lower_bitmap(nir_shader *shader, nir_builder *b, const nir_lower_bitmap_options *options) @@ -86,6 +97,7 @@ lower_bitmap(nir_shader *shader, nir_builder *b, nir_ssa_def *cond; nir_intrinsic_instr *discard; + add_sampler(shader, options); texcoord = nir_load_var(b, get_texcoord(shader)); tex = nir_tex_instr_create(shader, 1); -- 2.17.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev