compiler: make glsl_sampler_dim available to CL

useful with the NIR bindings for image load/store.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
This commit is contained in:
Alyssa Rosenzweig 2024-11-18 16:12:17 -04:00 committed by Marge Bot
parent 39afffe956
commit 4477eed302
2 changed files with 14 additions and 13 deletions

View File

@ -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);

View File

@ -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