[Mesa-dev] [PATCH 01/13] gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS
Christoph Bumiller
e0425955 at student.tuwien.ac.at
Tue Sep 6 02:19:07 PDT 2011
On 05.09.2011 23:44, Marek Olšák wrote:
> ---
> src/gallium/include/pipe/p_defines.h | 1 +
> src/mesa/state_tracker/st_extensions.c | 3 +++
> 2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 19c0cab..9a9ce2e 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -474,6 +474,7 @@ enum pipe_cap {
> PIPE_CAP_SCALED_RESOLVE = 49,
> PIPE_CAP_MIN_TEXEL_OFFSET = 50,
> PIPE_CAP_MAX_TEXEL_OFFSET = 51,
> + PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS = 52
> };
>
Can we remove the old PIPE_CAP_ARRAY_TEXTURES then in favour of
returning 0 as maximum number of layers ?
> /* Shader caps not specific to any single stage */
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index aa7f3b5..122ffab 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -85,6 +85,9 @@ void st_init_limits(struct st_context *st)
> c->MaxTextureRectSize
> = _min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
>
> + c->MaxArrayTextureLayers
> + = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
> +
> c->MaxTextureImageUnits
> = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
> MAX_TEXTURE_IMAGE_UNITS);
More information about the mesa-dev
mailing list