diff --git a/src/gallium/drivers/llvmpipe/ci/llvmpipe-cl.txt b/src/gallium/drivers/llvmpipe/ci/llvmpipe-cl.txt index dbbcbcde0e1..cbcb4abde89 100644 --- a/src/gallium/drivers/llvmpipe/ci/llvmpipe-cl.txt +++ b/src/gallium/drivers/llvmpipe/ci/llvmpipe-cl.txt @@ -73,17 +73,11 @@ program/execute/calls-struct/small struct in regs: fail program/execute/fdiv-modifiers-f32: fail program/execute/global-offset/3d, input dependent: fail program/execute/image-attributes: crash -program/execute/image-read-2d/read float from cl_float cl_rgba image.: fail -program/execute/image-read-2d/read signed integer from cl_signed_int8 cl_rgba image.: fail -program/execute/image-read-2d/read unsigned integer from cl_unsigned_int8 cl_rgba image.: fail program/execute/image-write-2d: crash program/execute/load-hi16-generic: skip program/execute/load-lo16-generic: skip program/execute/mad-mix: skip program/execute/program-tester-check-local-size-test-should-skip/this test should skip: skip -program/execute/sampler/read from image using clamp_to_edge addressing mode: fail -program/execute/sampler/read from image using linear filtering and normalized coords: fail -program/execute/sampler/read from image using linear filtering and unnormalized coords: fail program/execute/scalar-logical-float: skip program/execute/store-hi16-generic: skip program/execute/vload/vload-half-constant: skip diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index 70d47d964a8..151b37d3046 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -396,6 +396,12 @@ nir_shader *clover::nir::load_libclc_nir(const device &dev, std::string &r_log) &spirv_options, compiler_options); } +static bool +can_remove_var(nir_variable *var, void *data) +{ + return !(var->type->is_sampler() || var->type->is_image()); +} + module clover::nir::spirv_to_nir(const module &mod, const device &dev, std::string &r_log) { @@ -525,7 +531,10 @@ module clover::nir::spirv_to_nir(const module &mod, const device &dev, NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_global, spirv_options.global_addr_format); - NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_all, NULL); + struct nir_remove_dead_variables_options remove_dead_variables_options = { + .can_remove_var = can_remove_var, + }; + NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_all, &remove_dead_variables_options); if (compiler_options->lower_int64_options) NIR_PASS_V(nir, nir_lower_int64);