[virglrenderer-devel] [PATCH v2 5/8] vrend, caps: move version-less common caps into common

Dave Airlie airlied at gmail.com
Fri Jul 27 03:42:58 UTC 2018


On 25 July 2018 at 22:49, Gert Wollny <gert.wollny at collabora.com> wrote:
> Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
>
> ---
>  src/vrend_renderer.c | 55 +++++++++++++++++-----------------------------------
>  1 file changed, 18 insertions(+), 37 deletions(-)
>
> diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> index 0c0280c..57e9ba0 100644
> --- a/src/vrend_renderer.c
> +++ b/src/vrend_renderer.c
> @@ -7394,6 +7394,7 @@ static void vrend_renderer_fill_caps_common(union virgl_caps *caps)
>  {
>     int i;
>     GLint max;
> +   GLfloat range[2];
>
>     /*
>      * We can't fully support this feature on GLES,
> @@ -7416,6 +7417,23 @@ static void vrend_renderer_fill_caps_common(union virgl_caps *caps)
>     glGetIntegerv(GL_MAX_SAMPLES, &max);
>     caps->v1.max_samples = max;
>
> +   glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, range);
> +   caps->v2.min_aliased_point_size = range[0];
> +   caps->v2.max_aliased_point_size = range[1];
> +
> +   glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, range);
> +   caps->v2.min_aliased_line_width = range[0];
> +   caps->v2.max_aliased_line_width = range[1];
> +
> +   glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS, &caps->v2.max_texture_lod_bias);
> +   glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, (GLint*)&caps->v2.max_vertex_attribs);
> +   glGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, &max);
> +   caps->v2.max_vertex_outputs = max / 4;
> +
> +   glGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET, &caps->v2.min_texel_offset);
> +   glGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET, &caps->v2.max_texel_offset);
> +
> +   glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, (GLint*)&caps->v2.uniform_buffer_offset_alignment);
>

This seems to start filling some v2 caps outside the fill_capset2 checks.

I've pushed 1-4.

Dave.


More information about the virglrenderer-devel mailing list