[virglrenderer-devel] [RFC PATCH 6/7] vrend caps: remove gles caps code path
Gert Wollny
gert.wollny at collabora.com
Mon Jul 23 10:38:04 UTC 2018
All that is set there is zeros, and since the structure is zeroed out at
the beginning this is superfluous.
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/vrend_renderer.c | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index f89aff2..6b6d4ac 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -7285,29 +7285,6 @@ static void vrend_renderer_fill_format_caps(union virgl_caps *caps)
}
}
-static void vrend_renderer_fill_caps_gles(bool fill_capset2, union virgl_caps *caps)
-{
- if (!fill_capset2) {
- return;
- }
-
- /* Not available on GLES */
- caps->v2.min_smooth_point_size = 0.0f;
- caps->v2.max_smooth_point_size = 0.0f;
-
- caps->v2.min_smooth_line_width = 0.0f;
- caps->v2.max_smooth_line_width = 0.0f;
-
- caps->v2.max_geom_output_vertices = 0;
- caps->v2.max_geom_total_output_components = 0;
- caps->v2.max_shader_patch_varyings = 0;
-
- caps->v2.min_texture_gather_offset = 0;
- caps->v2.max_texture_gather_offset = 0;
-
- caps->v2.texture_buffer_offset_alignment = 0;
-}
-
static void vrend_renderer_fill_caps_gl(bool fill_capset2,
union virgl_caps *caps)
{
@@ -7440,12 +7417,9 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED uint32_t version,
glGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, &max);
caps->v2.max_vertex_outputs = max / 4;
- /* GLES has it's own path */
- if (vrend_state.use_gles) {
- vrend_renderer_fill_caps_gles(fill_capset2, caps);
- } else {
+ /* Fill unversioned caps that are only available on GL and not on GLES */
+ if (!vrend_state.use_gles)
vrend_renderer_fill_caps_gl(fill_capset2, caps);
- }
if (gl_ver >= 30) {
caps->v1.bset.indep_blend_enable = 1;
--
2.16.4
More information about the virglrenderer-devel
mailing list