diff --git a/src/gallium/frontends/clover/core/kernel.cpp b/src/gallium/frontends/clover/core/kernel.cpp index 16be95e5906..5d8b0452563 100644 --- a/src/gallium/frontends/clover/core/kernel.cpp +++ b/src/gallium/frontends/clover/core/kernel.cpp @@ -247,7 +247,7 @@ kernel::exec_context::bind(intrusive_ptr _q, case module::argument::constant_buffer: { auto arg = argument::create(marg); cl_mem buf = kern._constant_buffers.at(&q->device()).get(); - arg->set(q->device().address_bits() / 8, &buf); + arg->set(sizeof(buf), &buf); arg->bind(*this, marg); break; } diff --git a/src/gallium/frontends/clover/nir/invocation.cpp b/src/gallium/frontends/clover/nir/invocation.cpp index d807e270ce1..f491691abbb 100644 --- a/src/gallium/frontends/clover/nir/invocation.cpp +++ b/src/gallium/frontends/clover/nir/invocation.cpp @@ -324,8 +324,8 @@ clover_lower_nir(nir_shader *nir, std::vector &args, "constant_buffer_addr"); constant_var->data.location = args.size(); - args.emplace_back(module::argument::global, - pointer_bit_size / 8, pointer_bit_size / 8, pointer_bit_size / 8, + args.emplace_back(module::argument::global, sizeof(cl_mem), + pointer_bit_size / 8, pointer_bit_size / 8, module::argument::zero_ext, module::argument::constant_buffer); }