From cae1ef0a11a6846d3caafd7fcafeadd6fa7ca6d2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 19 Oct 2021 06:40:24 +1000 Subject: [PATCH] clover: use max shader sampler view/images queries for clover. This is probably sane than my last answer to this question Reviewed-by: Karol Herbst Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/frontends/clover/core/device.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/clover/core/device.cpp b/src/gallium/frontends/clover/core/device.cpp index 7ef66d50492..2e3d77d2bf3 100644 --- a/src/gallium/frontends/clover/core/device.cpp +++ b/src/gallium/frontends/clover/core/device.cpp @@ -221,12 +221,14 @@ device::vendor_id() const { size_t device::max_images_read() const { - return PIPE_MAX_SHADER_SAMPLER_VIEWS; + return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE, + PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS); } size_t device::max_images_write() const { - return PIPE_MAX_SHADER_IMAGES; + return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE, + PIPE_SHADER_CAP_MAX_SHADER_IMAGES); } size_t