diff options
author | Dave Airlie <[email protected]> | 2018-02-15 14:20:37 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-03-05 13:29:38 +1000 |
commit | cd32258ec12e8edaf9facfa0715ad40032530f7e (patch) | |
tree | 2bfc7f9f4bcfdebf9fc4af0735273e38b69a558c /src/gallium/drivers | |
parent | 70190a656766019107d82aa5404ffa1cad9fb6e4 (diff) |
virgl: handle getting new capsets.
This checks the kernel api is new enough and asks for the
larger caps size since the kernel won't mess it up now.
Reviewed-by: Stéphane Marchesin <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_winsys.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_winsys.h b/src/gallium/drivers/virgl/virgl_winsys.h index ea21f2b6712..d633678597b 100644 --- a/src/gallium/drivers/virgl/virgl_winsys.h +++ b/src/gallium/drivers/virgl/virgl_winsys.h @@ -109,5 +109,28 @@ struct virgl_winsys { struct pipe_box *sub_box); }; - +/* this defaults all newer caps, + * the kernel will overwrite these if newer version is available. + */ +static inline void virgl_ws_fill_new_caps_defaults(struct virgl_drm_caps *caps) +{ + caps->caps.v2.min_aliased_point_size = 0.f; + caps->caps.v2.max_aliased_point_size = 255.f; + caps->caps.v2.min_smooth_point_size = 0.f; + caps->caps.v2.max_smooth_point_size = 255.f; + caps->caps.v2.min_aliased_line_width = 0.f; + caps->caps.v2.max_aliased_line_width = 255.f; + caps->caps.v2.min_smooth_line_width = 0.f; + caps->caps.v2.max_smooth_line_width = 255.f; + caps->caps.v2.max_texture_lod_bias = 16.0f; + caps->caps.v2.max_geom_output_vertices = 256; + caps->caps.v2.max_geom_total_output_components = 16384; + caps->caps.v2.max_vertex_outputs = 32; + caps->caps.v2.max_vertex_attribs = 16; + caps->caps.v2.max_shader_patch_varyings = 0; + caps->caps.v2.min_texel_offset = -8; + caps->caps.v2.max_texel_offset = 7; + caps->caps.v2.min_texture_gather_offset = -8; + caps->caps.v2.max_texture_gather_offset = 7; +} #endif |