From 4477eed302391851c314109a191e5468ab99877d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 18 Nov 2024 16:12:17 -0400 Subject: [PATCH] compiler: make glsl_sampler_dim available to CL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit useful with the NIR bindings for image load/store. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl_types.h | 13 ------------- src/compiler/shader_enums.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index ce64318eb58..2d3effca37a 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -232,19 +232,6 @@ glsl_signed_base_type_of(enum glsl_base_type type) } } -enum glsl_sampler_dim { - GLSL_SAMPLER_DIM_1D = 0, - GLSL_SAMPLER_DIM_2D, - GLSL_SAMPLER_DIM_3D, - GLSL_SAMPLER_DIM_CUBE, - GLSL_SAMPLER_DIM_RECT, - GLSL_SAMPLER_DIM_BUF, - GLSL_SAMPLER_DIM_EXTERNAL, - GLSL_SAMPLER_DIM_MS, - GLSL_SAMPLER_DIM_SUBPASS, /* for vulkan input attachments */ - GLSL_SAMPLER_DIM_SUBPASS_MS, /* for multisampled vulkan input attachments */ -}; - int glsl_get_sampler_dim_coordinate_components(enum glsl_sampler_dim dim); diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index a9a38bf3149..2aa7f1caca8 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -1613,6 +1613,20 @@ typedef enum { const char *mesa_scope_name(mesa_scope scope); +/* This is defined here to be available to OpenCL */ +enum glsl_sampler_dim { + GLSL_SAMPLER_DIM_1D = 0, + GLSL_SAMPLER_DIM_2D, + GLSL_SAMPLER_DIM_3D, + GLSL_SAMPLER_DIM_CUBE, + GLSL_SAMPLER_DIM_RECT, + GLSL_SAMPLER_DIM_BUF, + GLSL_SAMPLER_DIM_EXTERNAL, + GLSL_SAMPLER_DIM_MS, + GLSL_SAMPLER_DIM_SUBPASS, /* for vulkan input attachments */ + GLSL_SAMPLER_DIM_SUBPASS_MS, /* for multisampled vulkan input attachments */ +}; + #ifdef __cplusplus } /* extern "C" */ #endif