[Mesa-dev] [PATCH 2/4] vc4: Drop a bunch of duplicated gallium PIPE_CAP default code.
Ian Romanick
idr at freedesktop.org
Sat Aug 11 03:09:24 UTC 2018
On 08/10/2018 06:20 PM, Eric Anholt wrote:
> Now that we have the util function for the default values, we can get rid
> of the boilerplate.
> ---
> src/gallium/auxiliary/util/u_screen.c | 6 +-
> src/gallium/drivers/vc4/vc4_screen.c | 171 --------------------------
> 2 files changed, 1 insertion(+), 176 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
> index 18475fcf1377..f74dbb2e0f71 100644
> --- a/src/gallium/auxiliary/util/u_screen.c
> +++ b/src/gallium/auxiliary/util/u_screen.c
> @@ -63,11 +63,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
> case PIPE_CAP_PRIMITIVE_RESTART:
> case PIPE_CAP_INDEP_BLEND_ENABLE:
> case PIPE_CAP_INDEP_BLEND_FUNC:
> - return 0;
> -
> - case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
> - unreachable("driver must implement these.");
> -
> + case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS: /* Enables GL_EXT_texture_array */
> case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
> case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
> case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
> diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
> index feed9a97f31b..5c8cc9f12d48 100644
> --- a/src/gallium/drivers/vc4/vc4_screen.c
> +++ b/src/gallium/drivers/vc4/vc4_screen.c
> @@ -144,8 +144,6 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_BLEND_EQUATION_SEPARATE:
> case PIPE_CAP_TEXTURE_MULTISAMPLE:
> case PIPE_CAP_TEXTURE_SWIZZLE:
> - case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
> - case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
> case PIPE_CAP_TEXTURE_BARRIER:
> return 1;
>
> @@ -161,16 +159,10 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
> case PIPE_CAP_POINT_SPRITE:
> return 1;
>
> - case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
> - return 256;
> -
> case PIPE_CAP_GLSL_FEATURE_LEVEL:
> case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY:
> return 120;
Can probably get rid of this too since GLSL 1.20 is the minimum possible
to support in Mesa.
>
> - case PIPE_CAP_MAX_VIEWPORTS:
> - return 1;
> -
> case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
> case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
> return 1;
More information about the mesa-dev
mailing list