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 <gurchetansingh@chromium.org>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Erik Faye-Lund 6 years ago committed by Jakob Bornecrantz
parent 945003caea
commit 829176087c
  1. 3
      src/virgl_hw.h
  2. 4
      src/vrend_renderer.c

@ -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 {

@ -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);

Loading…
Cancel
Save