Module: Mesa Branch: main Commit: a36ad49e0e6f436f8409bed3f742098b34abb79d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a36ad49e0e6f436f8409bed3f742098b34abb79d
Author: Yonggang Luo <[email protected]> Date: Thu Aug 3 11:52:15 2023 +0800 microsoft/clc: Use 128 instead of PIPE_MAX_SHADER_SAMPLER_VIEWS Signed-off-by: Yonggang Luo <[email protected]> Acked-by: Jesse Natalie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24440> --- src/microsoft/clc/clc_compiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/microsoft/clc/clc_compiler.c b/src/microsoft/clc/clc_compiler.c index 3098c01d51b..882f4dba653 100644 --- a/src/microsoft/clc/clc_compiler.c +++ b/src/microsoft/clc/clc_compiler.c @@ -733,7 +733,8 @@ clc_spirv_to_dxil(struct clc_libclc *lib, NIR_PASS_V(nir, nir_scale_fdiv); - dxil_wrap_sampler_state int_sampler_states[PIPE_MAX_SHADER_SAMPLER_VIEWS] = { {{0}} }; + /* 128 is the minimum value for CL_DEVICE_MAX_READ_IMAGE_ARGS and used by CLOn12 */ + dxil_wrap_sampler_state int_sampler_states[128] = { {{0}} }; unsigned sampler_id = 0; NIR_PASS_V(nir, nir_lower_variable_initializers, ~(nir_var_function_temp | nir_var_shader_temp));
