From 829176087cb20608c00d8a293371ab3dcb849588 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 14 Aug 2018 13:57:41 +0200 Subject: [PATCH] renderer: query host for max texture sizes This way we can report the actual max texture, rather than a conservative guess like we do now. Reviewed-by: Gurchetan Singh Signed-off-by: Erik Faye-Lund Signed-off-by: Jakob Bornecrantz --- src/virgl_hw.h | 3 +++ src/vrend_renderer.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/virgl_hw.h b/src/virgl_hw.h index b56f554..787452d 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -347,6 +347,9 @@ struct virgl_caps_v2 { uint32_t max_compute_shared_memory_size; uint32_t max_compute_grid_size[3]; uint32_t max_compute_block_size[3]; + uint32_t max_texture_2d_size; + uint32_t max_texture_3d_size; + uint32_t max_texture_cube_size; }; union virgl_caps { diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 57f3a1b..347b21c 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -8092,6 +8092,10 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, (GLint*)&caps->v2.uniform_buffer_offset_alignment); + glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*)&caps->v2.max_texture_2d_size); + glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, (GLint*)&caps->v2.max_texture_3d_size); + glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, (GLint*)&caps->v2.max_texture_cube_size); + if (has_feature(feat_geometry_shader)) { glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, (GLint*)&caps->v2.max_geom_output_vertices); glGetIntegerv(GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, (GLint*)&caps->v2.max_geom_total_output_components);