From d361a0be28646b5689c583609d98208c505faaf4 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Sun, 23 Apr 2023 19:29:19 +0200 Subject: [PATCH] llvmpipe: Disable the linear path when running vulkan It doesn't implement vulkan style resources. Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c index ea8d5f9ac93..06e9e3b2b41 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c @@ -388,7 +388,7 @@ llvmpipe_nir_fn_is_linear_compat(const struct nir_shader *shader, return false; nir_load_const_instr *load = nir_instr_as_load_const(intrin->src[0].ssa->parent_instr); - if (load->value[0].u32 != 0) + if (load->value[0].u32 != 0 || load->def.num_components > 1) return false; } else if (intrin->intrinsic == nir_intrinsic_store_deref) { /* @@ -418,6 +418,9 @@ llvmpipe_nir_fn_is_linear_compat(const struct nir_shader *shader, //debug nir_print_shader((nir_shader *) shader, stdout); return false; } + } else if (tex->src[i].src_type == nir_tex_src_texture_handle || + tex->src[i].src_type == nir_tex_src_sampler_handle) { + return false; } }