From: Erik Faye-Lund Date: Fri, 19 Jul 2019 15:05:19 +0000 (+0200) Subject: zink: do not lower bools to float X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b28156413f9aec9207bfa185376e92fae43138c8;p=mesa.git zink: do not lower bools to float Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 74eda10f93f..0f5e9d4f9f1 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -1434,7 +1434,7 @@ static SpvId get_src_bool(struct ntv_context *ctx, nir_src *src) { SpvId def = get_src_uint(ctx, src); - assert(nir_src_bit_size(*src) == 32); + assert(nir_src_bit_size(*src) == 1); unsigned num_components = nir_src_num_components(*src); return uvec_to_bvec(ctx, def, num_components); } diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index afe93bff0ed..d5c9a42b29c 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -325,7 +325,6 @@ zink_compile_nir(struct zink_screen *screen, struct nir_shader *nir) NIR_PASS_V(nir, lower_uniforms_to_ubo); NIR_PASS_V(nir, position_to_vulkan); NIR_PASS_V(nir, nir_lower_regs_to_ssa); - NIR_PASS_V(nir, nir_lower_bool_to_float); optimize_nir(nir); NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_function_temp); NIR_PASS_V(nir, lower_discard_if);